Skip to content

Commit a5e9aae

Browse files
committed
docs: add about Filter file
1 parent 621323b commit a5e9aae

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

user_guide_src/source/general/modules.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,19 @@ the **Modules** config file, described above.
153153
.. note:: Since the files are being included into the current scope, the ``$routes`` instance is already defined for you.
154154
It will cause errors if you attempt to redefine that class.
155155

156+
Filters
157+
=======
158+
159+
By default, :doc:`filters </incoming/filters>` are automatically scanned for within modules.
160+
It can be turned off in the **Modules** config file, described above.
161+
162+
.. note:: Since the files are being included into the current scope, the ``$filters`` instance is already defined for you.
163+
It will cause errors if you attempt to redefine that class.
164+
165+
In the module's **Config/Filters.php** file, you need to define the aliases of the filters you use.::
166+
167+
$filters->aliases['menus'] = MenusFilter::class;
168+
156169
Controllers
157170
===========
158171

0 commit comments

Comments
 (0)