ICanBoogie
  • Documentation
  • API Reference
  • Module master
Namespaces
  • ICanBoogie
    • Module
Classes
  • Descriptor
  • Hooks
  • ModelCollection
  • ModuleCollection
  • ModuleRoute
  • ModuleTemplateResolver
Traits
  • ControllerBindings
  • CoreBindings
Exceptions
  • ModuleCollectionInstallFailed
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined

Class Hooks

Hook callbacks.

Namespace: ICanBoogie\Module
Located at Hooks.php

Methods summary

public static filter_autoconfig( array & $autoconfig )

Adds "modules" directories found in the app directories to module-path.

Adds "modules" directories found in the app directories to module-path.

Parameters

$autoconfig
public static on_core_configure( ICanBoogie\Core\ConfigureEvent $event, ICanBoogie\Core $app )

Extends application configuration according to modules features.

Extends application configuration according to modules features.

The method may extend the locale-path configuration value and the configuration paths according to the modules features.

Parameters

$event
$app
public static on_core_boot( ICanBoogie\Core\BootEvent $event, ICanBoogie\Core $app )

Boot enabled modules.

Boot enabled modules.

Before the modules are actually booted up, their index is used to alter the I18n load paths and the config paths.

Parameters

$event
$app
public static before_synthesize_routes( ICanBoogie\Binding\Routing\BeforeSynthesizeRoutesEvent $event )

Alter routes defined by modules by adding a module key that holds the identifier of the module that defines the route.

Alter routes defined by modules by adding a module key that holds the identifier of the module that defines the route.

Parameters

$event
public static on_template_resolver_alter( ICanBoogie\Render\TemplateResolver\AlterEvent $event )

Decorates the template resolver with a ICanBoogie\Module\ModuleTemplateResolver instance.

Decorates the template resolver with a ICanBoogie\Module\ModuleTemplateResolver instance.

Parameters

$event
public static on_view_alter( ICanBoogie\View\View\AlterEvent $event, ICanBoogie\View\View $target )

If the view renders a module's route, the "template" directory of that module is added to the list of templates locations. Also, the module is set as module view variable.

If the view renders a module's route, the "template" directory of that module is added to the list of templates locations. Also, the module is set as module view variable.

Parameters

$event
$target
public static get_modules( ICanBoogie\Core $app ) : ICanBoogie\Module\ModuleCollection

Return the ICanBoogie\Module\ModuleCollection instance used to manage the modules attached to the core.

Return the ICanBoogie\Module\ModuleCollection instance used to manage the modules attached to the core.

Parameters

$app

Returns

ICanBoogie\Module\ModuleCollection
The modules provider.
public static get_models( ICanBoogie\Core $app ) : ICanBoogie\Module\ModelCollection

Returns the ICanBoogie\Module\ModelCollection instance used to obtain the models defined by the modules.

Returns the ICanBoogie\Module\ModelCollection instance used to obtain the models defined by the modules.

Parameters

$app

Returns

ICanBoogie\Module\ModelCollection
The models accessor.
public static controller_get_module( ICanBoogie\Routing\Controller $controller ) : ICanBoogie\Module

Return the ICanBoogie\Module instance associated with the route handled by the controller.

Return the ICanBoogie\Module instance associated with the route handled by the controller.

Parameters

$controller

Returns

ICanBoogie\Module
public static controller_get_model( ICanBoogie\Routing\Controller $controller ) : ICanBoogie\ActiveRecord\Model

Return the primary model of the module associated with the route handled by the controller.

Return the primary model of the module associated with the route handled by the controller.

Parameters

$controller

Returns

ICanBoogie\ActiveRecord\Model

See

ICanBoogie\Module\Hooks::controller_get_module()
public static controller_lazy_get_records_fetcher( ICanBoogie\Routing\Controller $controller ) : ICanBoogie\Facets\Fetcher

Return a record fetcher for the controller model.

Return a record fetcher for the controller model.

Note: The "icanboogie/facets" package is required.

Parameters

$controller

Returns

ICanBoogie\Facets\Fetcher
public static controller_fetch_records( ICanBoogie\Routing\Controller $controller, array $modifiers ) : ICanBoogie\Facets\RecordCollection

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers

Returns

ICanBoogie\Facets\RecordCollection
public static controller_fetch_record( ICanBoogie\Routing\Controller $controller, array $modifiers, ICanBoogie\Facets\Fetcher|null & $fetcher = null ) : ICanBoogie\ActiveRecord

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers
$fetcher
Reference to a variable where the fetcher should be stored.

Returns

ICanBoogie\ActiveRecord
Module master – Check on GitHub – API documentation generated by ApiGen