About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
development:plugins:controllers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
development:plugins:controllers [2020/05/12 12:14] – [Overriding an Existing Controller] demiankatzdevelopment:plugins:controllers [2020/05/12 12:16] – [Creating a New Controller] demiankatz
Line 51: Line 51:
 Creating a new controller is much like overriding an existing one. Creating a new controller is much like overriding an existing one.
  
-  * As described above, create a custom module, build a new controller, and set up an invokables entry for it. +  * As described above, create a custom module, build a new controller, and set up a factory entry for it. If you are using VuFind 7.0 or newer, you can use the [[development:code_generators#creating_new_plugins|plugin generator]] (see the example below)
-  * Now you need to add routing rules so the framework knows how to find your controller and so you can conveniently link to it within templates.  VuFind's main configuration (module/VuFind/config/module.config.php) contains some variables and loops which automatically generate most of its routes.  You may wish to copy some of this logic into your own module's configuration file so you can set up routes in a similar fashion.+  * Now you need to add routing rules so the framework knows how to find your controller and so you can conveniently link to it within templates.  VuFind's main configuration (module/VuFind/config/module.config.php) contains some variables and loops which automatically generate most of its routes.  You may wish to copy some of this logic into your own module's configuration file so you can set up routes in a similar fashion. Alternatively, you can just use one of VuFind's [[development:code_generators#creating_routes|route generators]].
  
 ==== Example - How to add a new page to your theme ==== ==== Example - How to add a new page to your theme ====
development/plugins/controllers.txt · Last modified: 2021/08/03 14:04 by demiankatz