nod.st / cakephp-controllers-list
CakePHP Controllers List
Installs: 19
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Type:cakephp-plugin
Requires
- php: >=5.3.0
- composer/installers: *
This package is not auto-updated.
Last update: 2024-11-04 15:25:15 UTC
README
A plugin contains component for generating organized controllers list with include,exclude,order,sort and cache options.
Requirements
- CakePHP 2.1.0 or greater.
Download
- Click here
- or with Git:
- Submodule:
$ git submodule add https://github.com/JacopKane/Cake-ControllersList.git path/to/Plugins/ControllersList```
* Clone:
$ git submodule add https://github.com/JacopKane/Cake-ControllersList.git /path/to/Plugins/ControllersList```
Installation
- Load the plugin at bootstrap
- Define the component at your controller.
###Example:
<?php //Config/bootstrap.php CakePlugin::load('ControllersList')); //Controller/AppController.php public $components = array('ControllersList.GetList' => array( 'exclude' => array('Pages'), 'plugins_exclude' => array('DebugKit', 'CakeFoo'), 'order_by' => 'order', 'cache' => false )); ?>
###Other Options:
<?php array( 'cache' => true, //must use especially if order sorting is enabled 'log' => true, //if enabled, it'll log it, everytime new cache created 'set_disable' => false, //enable to pass list as a variable to the view 'set_variable' => 'controllersList', //variable name for getting controller lists in views 'exclude_currentController' => false, //exclude current controller 'exclude_appControllers' => true, //exclude AppController and PluginAppControllers 'exclude' => array(), //for excluding some extra controller names 'include' => array(), //for including some extra controller names 'order_sort' => 'desc', //desc or asc sorting 'order_by' => 'name', //sort by name or order 'order_disabled' => false, //for using this sorting you can add a "$order" property in your controller. enabling cache for this deadly recommended. 'plugins_disable' => false, //don't scan plugins 'plugins_exclude' => array(), //for excluding some extra plugin's controller 'plugins_include' => array() //for including some extra plugin's controller ); ?>