ICanBoogie/Module v2.2.4
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Module

Classes

  • Descriptor
  • Hooks
  • ModelCollection
  • ModuleCollection
  • ModuleTemplateResolver

Interfaces

  • HasModelProperty
  • HasModuleProperty
  • HasRecordsFetcherProperty

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_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.

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 ICanBoogie\Module\ModuleCollection
# get_modules( ICanBoogie\Core $app )

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 ICanBoogie\Module\ModelCollection
# get_models( ICanBoogie\Core $app )

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 ICanBoogie\Module
# controller_get_module( ICanBoogie\Routing\Controller $controller )

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 ICanBoogie\ActiveRecord\Model
# controller_get_model( ICanBoogie\Routing\Controller $controller )

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 ICanBoogie\Facets\Fetcher
# controller_lazy_get_records_fetcher( ICanBoogie\Routing\Controller $controller )

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 ICanBoogie\Facets\RecordCollection
# controller_fetch_records( ICanBoogie\Routing\Controller $controller, array $modifiers )

Fetch records using the controller records_fetcher.

Fetch records using the controller records_fetcher.

Parameters

$controller
$modifiers

Returns

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

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
ICanBoogie/Module v2.2.4 API documentation generated by ApiGen