Skip to content

Commit 89f1e89

Browse files
committed
Expand docs for plugin events
Refs cakephp/cakephp#17962
1 parent 7dd2386 commit 89f1e89

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

en/plugins.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,17 @@ Plugins offer several hooks that allow a plugin to inject itself into the
107107
appropriate parts of your application. The hooks are:
108108

109109
* ``bootstrap`` Used to load plugin default configuration files, define
110-
constants and other global functions.
110+
constants and other global functions. The ``bootstrap`` method is passed the
111+
current ``Application`` instance giving you broad access to the DI container
112+
and configuration.
111113
* ``routes`` Used to load routes for a plugin. Fired after application routes
112114
are loaded.
113115
* ``middleware`` Used to add plugin middleware to an application's middleware
114116
queue.
115117
* ``console`` Used to add console commands to an application's command
116118
collection.
117-
* ``services`` Used to register application container services
119+
* ``services`` Used to register application container service. This is a good
120+
opportunity to setup additional objects that need acccess to the container.
118121

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

0 commit comments

Comments
 (0)