| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
Application |
JController |
__construct |
__construct() |
Never | Work in Progress |
The class constructor performs the necessary tasks to instantiate the controller.
This involves the following steps:
JController __construct ( $config )
| $config | array | is an optional associative array of configuration settings. Recognized key values include ‘name’, ‘default_task’, ‘model_path’, and ‘view_path’ (this list is not meant to be comprehensive). |
A controller is often instantiated in the component entry point (the admin.component.php or component.php file, where component is the name of the component). This might be done in the following way:
Example
$controller = new BannersController( array('default_task' => 'click') );