API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5
|
JController::__construct | ( | $ | config = array() | ) |
Constructor.
protected
array | 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). |
Réimplémentée dans BannerControllerBanner, BannerControllerClient, ConfigControllerApplication, ConfigControllerComponent, PluginsController, PollController, UsersController, WeblinksController, et JInstallationController.
Références $config.
JController::_addPath | ( | $ | type, |
$ | path | ||
) |
JController::_createFileName | ( | $ | type, |
$ | parts = array() |
||
) |
& JController::_createModel | ( | $ | name, |
$ | prefix = '' , |
||
$ | config = array() |
||
) |
Method to load and return a model object.
private
string | The name of the model. |
string | Optional model prefix. |
array | Configuration array for the model. Optional. |
Références $config, $name, et JModel::getInstance().
& JController::_createView | ( | $ | name, |
$ | prefix = '' , |
||
$ | type = '' , |
||
$ | config = array() |
||
) |
Method to load and return a view object. This method first looks in the current template directory for a match, and failing that uses a default set path to load the view class file.
Note the "name, prefix, type" order of parameters, which differs from the "name, type, prefix" order used in related public methods.
private
string | The name of the view. |
string | Optional prefix for the view class name. |
string | The type of view. |
array | Configuration array for the view. Optional. |
Références $config, $name, $path, $type, JText::_(), JPath::find(), jimport(), et JError::raiseError().
JController::_setPath | ( | $ | type, |
$ | path | ||
) |
JController::addModelPath | ( | $ | path | ) | [static] |
Adds to the stack of model paths in LIFO order.
string|array | The directory (string), or list of directories (array) to add. |
Références $path, JModel::addIncludePath(), et jimport().
JController::addViewPath | ( | $ | path | ) | [static] |
Add one or more view paths to the controller's stack, in LIFO order.
string|array | The directory (string), or list of directories (array) to add. |
Références $path.
JController::authorize | ( | $ | task | ) |
Authorization check
public
string | $task | The ACO Section Value to check access on |
Références $task, $user, et JFactory::getUser().
JController::display | ( | $ | cachable = false | ) |
Typical view method for MVC based architecture
This function is provide as a default implementation, in most cases you will need to override it in your own controllers.
public
string | $cachable | If true, the view output will be cached |
Références $document, $option, $view, JFactory::getCache(), JRequest::getCmd(), et JFactory::getDocument().
JController::execute | ( | $ | task | ) |
Execute a task by triggering a method in the derived class.
public
string | The task to perform. If no matching task is found, the '__default' task is executed, if defined. |
Réimplémentée dans JInstallationController.
Références $task, JText::_(), elseif, et JError::raiseError().
& JController::getModel | ( | $ | name = '' , |
$ | prefix = '' , |
||
$ | config = array() |
||
) |
Method to get a model object, loading it if required.
public
string | The model name. Optional. |
string | The class prefix. Optional. |
array | Configuration array for model. Optional. |
Références $config, $item, $menu, $name, $params, et JFactory::getApplication().
JController::getName | ( | ) |
Method to get the controller name
The dispatcher name by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor
public
Références $name, et JError::raiseError().
JController::getTask | ( | ) |
Get the last task that is or was to be performed.
public
JController::getTasks | ( | ) |
Gets the available tasks in the controller. public
& JController::getView | ( | $ | name = '' , |
$ | type = '' , |
||
$ | prefix = '' , |
||
$ | config = array() |
||
) |
Method to get a reference to the current view and load it if necessary.
public
string | The view name. Optional, defaults to the controller name. |
string | The view type. Optional. |
string | The class prefix. Optional. |
array | Configuration array for view. Optional. |
Références $config, $name, $type, $view, JText::_(), et JError::raiseError().
JController::redirect | ( | ) |
Redirects the browser or returns false if no redirect is set.
public
Références $mainframe.
JController::registerDefaultTask | ( | $ | method | ) |
Register the default task to perform if a mapping is not found.
public
string | The name of the method in the derived class to perform if a named task is not found. |
JController::registerTask | ( | $ | task, |
$ | method | ||
) |
Register (map) a task to a method in the class.
public
string | The task. |
string | The name of the method in the derived class to perform for this task. |
Références $task.
JController::setAccessControl | ( | $ | section, |
$ | value = null |
||
) |
Sets the access control levels.
public
string | The ACO section (eg, the component). |
string | The ACO section value (if using a constant value). |
Références $section.
JController::setMessage | ( | $ | text | ) |
Sets the internal message that is passed with a redirect
public
string | The message |
Références $text.
JController::setRedirect | ( | $ | url, |
$ | msg = null , |
||
$ | type = 'message' |
||
) |
JController::$_acoSection = null |
JController::$_acoSectionValue = null |
JController::$_basePath = null |
JController::$_doTask = null |
JController::$_message = null |
JController::$_messageType = null |
JController::$_methods = null |
JController::$_name = null |
JController::$_path |
array(
'view' => array()
)
JController::$_redirect = null |
JController::$_task = null |
JController::$_taskMap = null |