Plugin Interface
string[]
['routes', 'bootstrap', 'console', 'middleware']
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.
\Cake\Core\PluginApplicationInterface
$app The host application
console(\Cake\Console\CommandCollection $commands)
Add console commands for the plugin.
\Cake\Console\CommandCollection
$commands The command collection to update
\Cake\Console\CommandCollection
disable(string $hook)
Disables the named hook
string
$hook The hook to disable
$this
enable(string $hook)
Enables the named hook
string
$hook The hook to disable
$this
getClassPath()
Get the filesystem path to configuration for this plugin
string
getConfigPath()
Get the filesystem path to configuration for this plugin
string
getName()
Get the name of this plugin.
string
getPath()
Get the filesystem path to this plugin
string
getTemplatePath()
Get the filesystem path to templates for this plugin
string
isEnabled(string $hook)
Check if the named hook is enabled
string
$hook The hook to check
bool
middleware(\Cake\Http\MiddlewareQueue $middlewareQueue)
Add middleware for the plugin.
\Cake\Http\MiddlewareQueue
$middlewareQueue The middleware queue to update.
\Cake\Http\MiddlewareQueue
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.
\Cake\Routing\RouteBuilder
$routes The route builder to update.
© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/interface-Cake.Core.PluginInterface.html