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

  • ActiveRecordProvider
  • CacheManager
  • Collection
  • Hooks
  • Module
  • Provider
  • TemplateResolver
  • View
  • ViewEditor
  • ViewEditorElement
  • ViewOptions

Class ActiveRecordProvider

Provides data for a view.

Icybee\Modules\Views\Provider
Extended by Icybee\Modules\Views\ActiveRecordProvider

Direct known subclasses

Icybee\Modules\Comments\ViewProvider, Icybee\Modules\Nodes\ViewProvider, Icybee\Modules\Users\ViewProvider

Indirect known subclasses

Icybee\Modules\Contents\ViewProvider

Abstract
Namespace: Icybee\Modules\Views
Located at vendor/icanboogie-modules/views/lib/activerecord-provider.php

Methods summary

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

Returns

array[ActiveRecord]|ICanBoogie\ActiveRecord|null
protected array
# fire_alter_conditions( array $payload )

Wraps a call to the Icybee\Modules\Views\Provider::alter_conditions() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterConditionsEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterConditionsEvent events.

Wraps a call to the Icybee\Modules\Views\Provider::alter_conditions() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterConditionsEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterConditionsEvent events.

Parameters

$payload
array
$payload Event payload.

Returns

array
The altered conditions.
protected ICanBoogie\ActiveRecord\Query
# alter_query( ICanBoogie\ActiveRecord\Query $query, array $conditions )

Alters the activerecord query using the provided conditions.

Alters the activerecord query using the provided conditions.

Parameters

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

Returns

ICanBoogie\ActiveRecord\Query
protected array
# fire_alter_query( array $payload )

Wraps a call to the Icybee\Modules\Views\ActiveRecordProvider::alter_query() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterQueryEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterQueryEvent events.

Wraps a call to the Icybee\Modules\Views\ActiveRecordProvider::alter_query() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterQueryEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterQueryEvent events.

Parameters

$payload
array
$payload Event payload.

Returns

array
The altered query.
protected array
# fire_alter_context( array $payload )

Wraps a call to the Icybee\Modules\Views\Provider::alter_context() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterContextEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterContextEvent events.

Wraps a call to the Icybee\Modules\Views\Provider::alter_context() method with the Icybee\Modules\Views\ActiveRecordProvider\BeforeAlterContextEvent and Icybee\Modules\Views\ActiveRecordProvider\AlterContextEvent events.

Parameters

$payload
array
$payload Event payload.

Returns

array
The altered context.
protected ICanBoogie\ActiveRecord\Query
# create_query( )

Create the activerecord query object.

Create the activerecord query object.

Returns

ICanBoogie\ActiveRecord\Query
protected
# count_result( ICanBoogie\ActiveRecord\Query $query )
protected
# limit_result( ICanBoogie\ActiveRecord\Query $query, mixed $limit, mixed $page )
protected ICanBoogie\ActiveRecord|array[ActiveRecord]|null
# extract_result( ICanBoogie\ActiveRecord\Query $query )

Extracts a result from the query.

Extracts a result from the query.

The returned result depends on the return type:

  • If the return type is Icybee\Modules\Views\Provider::RETURNS_ONE the first record is returned.
  • If the return type is Icybee\Modules\Views\Provider::RETURNS_MANY a number of records is returned according

to the range limit and range page, the count value of the range is updated with the number of records matching the query. The Icybee\Modules\Views\ActiveRecordProvider::count_result() method is used for this.

  • Otherwise, all the records matching the query are returned.

Returns

ICanBoogie\ActiveRecord|array[ActiveRecord]|null
If the provider must return one record, the method returns an ActiveRecord, or null if no record matching the conditions could be found, otherwise the method returns an array of ActiveRecord.

Methods inherited from Icybee\Modules\Views\Provider

__construct(), __get(), alter_conditions(), alter_context()

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