ICanBoogie
  • Documentation
  • API Reference
  • Module v2.1.0
Namespaces
  • ICanBoogie
    • Module
Classes
  • Descriptor
  • Hooks
  • ModelCollection
  • ModuleCollection
Exceptions
  • ModuleConstructorMissing
  • ModuleIsDisabled
  • ModuleNotDefined

Class Hooks

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_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_routing_collect_routes( ICanBoogie\Routing\BeforeCollectRoutesEvent $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_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.

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

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\ActiveRecord\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\ActiveRecord\Fetcher
public static controller_fetch_records( ICanBoogie\Routing\Controller $controller, array $modifiers ) : array

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers

Returns

array
Module v2.1.0 – Check on GitHub – API documentation generated by ApiGen