Skip to content

Commit adc23ac

Browse files
committed
docs: move "Load Order" section to "Loading a Helper"
1 parent 1836e24 commit adc23ac

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

user_guide_src/source/general/helpers.rst

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,19 @@ for details.
7676
Or you can :ref:`specify a namespace <helpers-loading-from-specified-namespace>`
7777
for a helper that you want to load.
7878

79+
Load Order
80+
----------
81+
82+
The :php:func:`helper()` function will scan through all defined namespaces and
83+
load in ALL matching helpers of the same name. This allows any module's helpers
84+
to be loaded, as well as any helpers you've created specifically for this application.
85+
86+
The load order is as follows:
87+
88+
1. app/Helpers - Files loaded here are always loaded first.
89+
2. {namespace}/Helpers - All namespaces are looped through in the order they are defined.
90+
3. system/Helpers - The base file is loaded last.
91+
7992
Loading Multiple Helpers
8093
========================
8194

@@ -186,15 +199,7 @@ functions:
186199

187200
.. important:: Do not specify the namespace ``App\Helpers``.
188201

189-
The :php:func:`helper()` function will scan through all PSR-4 namespaces defined in **app/Config/Autoload.php**
190-
and load in ALL matching helpers of the same name. This allows any module's helpers
191-
to be loaded, as well as any helpers you've created specifically for this application.
192-
193-
The load order is as follows:
194-
195-
1. app/Helpers - Files loaded here are always loaded first.
196-
2. {namespace}/Helpers - All namespaces are looped through in the order they are defined.
197-
3. system/Helpers - The base file is loaded last.
202+
See `Load Order`_ for the order in which helper files are loaded.
198203

199204
*********
200205
Now What?

0 commit comments

Comments
 (0)