MR Controller
This class is used as a view controller and provides a nice way to handle header/footer printing, error/success messaging, access control and of course executing the code specific to your action.
Located in /controller.php (line 68)
mr_readonly | --mr_controller
Class | Description |
---|---|
mr_controller_admin | MR Controller for Administrative Settings Pages |
mr_controller_block | MR Controller for Blocks |
mr_controller_mod | MR Controller for Modules |
Current action being executed by the controller
Get string component
Global configuration for plugin
Controller heading
Helper
Get string idenifier
MR Frameworks renderer
Name of the controller, this is automatically defined in __construct
Either plugin's renderer or core renderer
The plugin path
Controller tabs
URL of the controller
Add tabs for the controller
Render a controller view
Based on "controller" and "action" parameters, create a controller instance that corresponds to "controller" param and then, if available call the method defined in the "action" parameter, but with the word "_action" appended to it. Example, "controller" parameter is set to "foo" and the "action" parameter is set to "bar", then this will load up controller/foo.php and call method "bar_action".
Constructor
Setup the controller with plugin specific configurations.
Get global plugin config
Get controller context
Controller Initialization
Override if your controller needs to do specific setup before running. Everything should be setup at this point except for $this->output and $this->mroutput.
Example tasks to do in init():
Setup controller tabs
This goes through all of the controllers and calls the add_tabs() method to get all the available tabs.
Generate a new URL to this controller
Footer output
Header output
Call the necessary calls to require_capability
Use $this->action for current action being executed
Controller setup
Inherited From mr_readonly
mr_readonly::__call()
Documentation generated on Thu, 28 Jun 2012 16:33:47 -0700 by phpDocumentor 1.4.3