Autodoc
  • Namespace
  • Class
  • Tree

Namespaces

  • BlueTihi
    • Context
  • Brickrouge
    • Element
      • Nodes
    • Renderer
    • Widget
  • ICanBoogie
    • ActiveRecord
    • AutoConfig
    • CLDR
    • Composer
    • Core
    • Event
    • Exception
    • HTTP
      • Dispatcher
      • Request
    • I18n
      • Translator
    • Mailer
    • Modules
      • Taxonomy
        • Support
      • Thumbnailer
        • Versions
    • Object
    • Operation
      • Dispatcher
    • Prototype
    • Routes
    • Routing
      • Dispatcher
    • Session
  • Icybee
    • ActiveRecord
      • Model
    • ConfigOperation
    • Document
    • EditBlock
    • Element
      • ActionbarContextual
      • ActionbarSearch
      • ActionbarToolbar
    • FormBlock
    • Installer
    • ManageBlock
    • Modules
      • Articles
      • Cache
        • Collection
        • ManageBlock
      • Comments
        • ManageBlock
      • Contents
        • ManageBlock
      • Dashboard
      • Editor
        • Collection
      • Files
        • File
        • ManageBlock
      • Forms
        • Form
        • ManageBlock
      • I18n
      • Images
        • ManageBlock
      • Members
      • Modules
        • ManageBlock
      • Nodes
        • ManageBlock
        • Module
      • Pages
        • BreadcrumbElement
        • LanguagesElement
        • ManageBlock
        • NavigationBranchElement
        • NavigationElement
        • Page
        • PageController
      • Registry
      • Search
      • Seo
      • Sites
        • ManageBlock
      • Taxonomy
        • Terms
          • ManageBlock
        • Vocabulary
          • ManageBlock
      • Users
        • ManageBlock
        • NonceLogin
        • Roles
      • Views
        • ActiveRecordProvider
        • Collection
        • View
    • Operation
      • ActiveRecord
      • Constructor
      • Module
      • Widget
    • Rendering
  • None
  • Patron
  • PHP

Classes

  • CacheManager
  • ConfigBlock
  • ConfigOperation
  • Content
  • DeleteBlock
  • EditBlock
  • HomeExcludeOperation
  • HomeIncludeOperation
  • Hooks
  • ManageBlock
  • Model
  • Module
  • Rendered
  • SaveOperation
  • Update20140330
  • ViewProvider

Traits

  • DateProperty

Class ViewProvider

Provides data for a view.

Icybee\Modules\Views\Provider
Extended by Icybee\Modules\Views\ActiveRecordProvider
Extended by Icybee\Modules\Nodes\ViewProvider
Extended by Icybee\Modules\Contents\ViewProvider
Namespace: Icybee\Modules\Contents
Located at vendor/icanboogie-modules/contents/lib/views/provider.php

Methods summary

public array[ActiveRecord]|ICanBoogie\ActiveRecord|null
# __invoke( )

Tries to rescue the record if finding the record failed.

Tries to rescue the record if finding the record failed.

Returns

array[ActiveRecord]|ICanBoogie\ActiveRecord|null

Throws

a
HTTPException with code 404 if no record matching the conditions could be found and the view is of type "view".
a
HTTPException with code 401 if the record is offline and user don't have access permission and the view is of type "view".

Overrides

Icybee\Modules\Nodes\ViewProvider::__invoke
protected ICanBoogie\ActiveRecord\Query
# alter_query( ICanBoogie\ActiveRecord\Query $query, array $conditions )

Support for the year, month and day conditions. Changes the order to date DESC, created_at DESC.

Support for the year, month and day conditions. Changes the order to date DESC, created_at DESC.

If the view is of type "home" the query is altered to search for nodes which are not excluded from _home_.

Parameters

$query
ICanBoogie\ActiveRecord\Query
$query
$conditions
array
$conditions

Returns

ICanBoogie\ActiveRecord\Query

Overrides

Icybee\Modules\Nodes\ViewProvider::alter_query
protected Icybee\Modules\Contents\Content|null
# rescue( )

Rescues a missing record by providing the best matching one.

Rescues a missing record by providing the best matching one.

Match is computed from the slug of the module's own visible records, thus rescue if only triggered if 'slug' is defined in the conditions.

Returns

Icybee\Modules\Contents\Content|null
The record best matching the condition slug, or null if none was similar enough.

Throws

ICanBoogie\ActiveRecord\RecordNotFound
if the record could not be rescued.

Todo-20140429

This should be in an exception rescue listener.

Methods inherited from Icybee\Modules\Nodes\ViewProvider

alter_conditions(), alter_context()

Methods inherited from Icybee\Modules\Views\ActiveRecordProvider

count_result(), create_query(), extract_result(), fire_alter_conditions(), fire_alter_context(), fire_alter_query(), limit_result()

Methods inherited from Icybee\Modules\Views\Provider

__construct(), __get()

Magic methods summary

Constants summary

Constants inherited from Icybee\Modules\Views\Provider

RETURNS_MANY, RETURNS_ONE, RETURNS_OTHER

Properties summary

Properties inherited from Icybee\Modules\Views\Provider

$conditions, $context, $module, $returns, $view

Autodoc API documentation generated by ApiGen 2.8.0