| API | Package | Subpackage | Class | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Application |
JController |
JController |
Never | Work in Progress |
JController is the base class for a Joomla! controller.
The controller controls the execution for a component written using the MVC design pattern. It provides basic functionality, such as rendering views and invoking the model to manipulate data.
| Method | Description |
|---|---|
__construct | Class constructor. |
addModelPath | Adds to the stack of controller model paths in LIFO order. |
addViewPath | Add one or more view paths to the controller’s stack, in LIFO order. |
authorize | Checks if a user is authorized to perform the specified task. |
display | Typical view method for MVC based architecture. |
execute | Execute a task by triggering a method in the derived class. |
getError | Get the error message. |
getModel | Method to get a model object, loading the class definition if required. |
getTask | Get the last task that is or was to be performed. |
getTasks | Gets the available tasks in the controller. |
getView | Method to get a reference to the current view and load it if necessary. |
redirect | Redirects the browser or returns false if no redirect is set. |
registerDefaultTask | Register the default task to perform if a mapping is not found. |
registerTask | Register (map) a task to a method in the class. |
setAccessControl | Sets the access control levels. |
setError | Set the error message. |
setMessage | Sets the internal message that is passed with a redirect. |
setRedirect | Set a URL for browser redirection. |
_addPath | Adds a directory to the search path for templates and resources. |
_setPath | Sets an entire array of search paths for resources. |