Interface PluginInterface
Plugin Interface
Direct Implementers
Constants summary
Method Summary
-
bootstrap() public
Load all the application configuration and bootstrap logic. -
console() public
Add console commands for the plugin. -
disable() public
Disables the named hook -
enable() public
Enables the named hook -
getClassPath() public
Get the filesystem path to configuration for this plugin -
getConfigPath() public
Get the filesystem path to configuration for this plugin -
getName() public
Get the name of this plugin. -
getPath() public
Get the filesystem path to this plugin -
isEnabled() public
Check if the named hook is enabled -
middleware() public
Add middleware for the plugin. -
routes() public
Add routes for the plugin.
Method Detail
bootstrap() public ¶
bootstrap( Cake\Core\PluginApplicationInterface
$app )
Load all the application configuration and bootstrap logic.
The default implementation of this method will include the config/bootstrap.php
in the plugin if it exist. You
can override this method to replace that behavior.
The host application is provided as an argument. This allows you to load additional plugin dependencies, or attach events.
Parameters
-
Cake\Core\PluginApplicationInterface
$app - The host application
console() public ¶
console( Cake\Console\CommandCollection
$commands )
Add console commands for the plugin.
Parameters
-
Cake\Console\CommandCollection
$commands - The command collection to update
Returns
disable() public ¶
disable( string $hook )
Disables the named hook
Parameters
- string $hook
- The hook to disable
Returns
$this
enable() public ¶
enable( string $hook )
Enables the named hook
Parameters
- string $hook
- The hook to disable
Returns
$this
getClassPath() public ¶
getClassPath( )
Get the filesystem path to configuration for this plugin
Returns
getConfigPath() public ¶
getConfigPath( )
Get the filesystem path to configuration for this plugin
Returns
isEnabled() public ¶
isEnabled( string $hook )
Check if the named hook is enabled
Parameters
- string $hook
- The hook to check
Returns
middleware() public ¶
middleware( Cake\Http\MiddlewareQueue
$middleware )
Add middleware for the plugin.
Parameters
-
Cake\Http\MiddlewareQueue
$middleware - The middleware queue to update.
Returns
routes() public ¶
routes( Cake\Routing\RouteBuilder
$routes )
Add routes for the plugin.
The default implementation of this method will include the config/routes.php
in the plugin if it exists. You
can override this method to replace that behavior.
Parameters
-
Cake\Routing\RouteBuilder
$routes - The route builder to update.