Skip to content

Commit

Permalink
Merge pull request #7928 from cakephp/plugin-events
Browse files Browse the repository at this point in the history
Expand docs for plugin events
  • Loading branch information
markstory authored Oct 15, 2024
2 parents 0be5e8b + 89f1e89 commit 8b53b38
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions en/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,17 @@ Plugins offer several hooks that allow a plugin to inject itself into the
appropriate parts of your application. The hooks are:

* ``bootstrap`` Used to load plugin default configuration files, define
constants and other global functions.
constants and other global functions. The ``bootstrap`` method is passed the
current ``Application`` instance giving you broad access to the DI container
and configuration.
* ``routes`` Used to load routes for a plugin. Fired after application routes
are loaded.
* ``middleware`` Used to add plugin middleware to an application's middleware
queue.
* ``console`` Used to add console commands to an application's command
collection.
* ``services`` Used to register application container services
* ``services`` Used to register application container service. This is a good
opportunity to setup additional objects that need acccess to the container.

By default all plugins hooks are enabled. You can disable hooks by using the
related options of the ``plugin load`` command:
Expand Down

0 comments on commit 8b53b38

Please sign in to comment.