Joomla CMS
2.5.24 (avec JPlatform 11.4 inclus)
Documentation des API du CMS Joomla en version 2.5 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($config=array()) | |
addViewPath ($path) | |
authorize ($task) | |
authorise ($task) | |
display ($cachable=false, $urlparams=false) | |
execute ($task) | |
getModel ($name= '', $prefix= '', $config=array()) | |
getName () | |
getTask () | |
getTasks () | |
getView ($name= '', $type= '', $prefix= '', $config=array()) | |
redirect () | |
registerDefaultTask ($method) | |
registerTask ($task, $method) | |
unregisterTask ($task) | |
setAccessControl ($section, $value=null) | |
setMessage ($text, $type= 'message') | |
setRedirect ($url, $msg=null, $type=null) | |
Fonctions membres publiques inherited from JObject | |
__toString () | |
def ($property, $default=null) | |
get ($property, $default=null) | |
getProperties ($public=true) | |
getError ($i=null, $toString=true) | |
getErrors () | |
set ($property, $value=null) | |
setProperties ($properties) | |
setError ($error) | |
toString () |
Fonctions membres publiques statiques | |
static | addModelPath ($path, $prefix= '') |
static | getInstance ($prefix, $config=array()) |
Fonctions membres protégées | |
addPath ($type, $path) | |
checkEditId ($context, $id) | |
createModel ($name, $prefix= '', $config=array()) | |
createView ($name, $prefix= '', $type= '', $config=array()) | |
holdEditId ($context, $id) | |
releaseEditId ($context, $id) | |
setPath ($type, $path) |
Fonctions membres protégées statiques | |
static | createFileName ($type, $parts=array()) |
Attributs protégés | |
$_acoSection | |
$_acoSectionValue | |
$basePath | |
$default_view | |
$doTask | |
$message | |
$messageType | |
$methods | |
$name | |
$model_prefix | |
$paths | |
$redirect | |
$task | |
$taskMap | |
Attributs protégés inherited from JObject | |
$_errors = array() |
Attributs protégés statiques | |
static | $instance |
JController::__construct | ( | $config = array() | ) |
Constructor.
array | $config | 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 à partir de JObject.
Réimplémentée dans JControllerForm, JControllerAdmin, UsersControllerUsers, CategoriesControllerCategory, BannersControllerBanners, ContactControllerContacts, ContentControllerArticles, LanguagesControllerStrings, CategoriesController, ContentControllerArticle, ConfigControllerComponent, ConfigControllerApplication, InstallerControllerManage, TemplatesControllerSource, MenusControllerItems, et ContentController.
Références $config, JLog\addLogger(), JLog\ALL, elseif, JDEBUG, et null.
|
static |
Adds to the stack of model paths in LIFO order.
mixed | $path | The directory (string), or list of directories (array) to add. |
string | $prefix | A prefix for models |
Références $path, JModel\addIncludePath(), et jimport().
|
protected |
Adds to the search path for templates and resources.
string | $type | The path type (e.g. 'model', 'view'). |
mixed | $path | The directory string or stream array to search. |
Références $path, $type, et JPath\check().
JController::addViewPath | ( | $path | ) |
Add one or more view paths to the controller's stack, in LIFO order.
mixed | $path | The directory (string) or list of directories (array) to add. |
Références $path.
JController::authorise | ( | $task | ) |
Authorisation check
string | $task | The ACO Section Value to check access on. |
Références $task, $user, et JFactory\getUser().
JController::authorize | ( | $task | ) |
Authorisation check
string | $task | The ACO Section Value to check access on |
Références $task, JLog\add(), et JLog\WARNING.
|
protected |
Method to check whether an ID is in the edit list.
string | $context | The context for the session storage. |
integer | $id | The ID of the record to add to the edit list. |
Références $app, $id, JLog\add(), JFactory\getApplication(), JLog\INFO, et JDEBUG.
|
staticprotected |
|
protected |
Method to load and return a model object.
string | $name | The name of the model. |
string | $prefix | Optional model prefix. |
array | $config | Configuration array for the model. Optional. |
Références $config, $name, et JModel\getInstance().
|
protected |
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.
string | $name | The name of the view. |
string | $prefix | Optional prefix for the view class name. |
string | $type | The type of view. |
array | $config | Configuration array for the view. Optional. |
Références $config, $name, $path, $type, JPath\find(), jimport(), null, JError\raiseError(), et JText\sprintf().
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.
boolean | $cachable | If true, the view output will be cached |
array | $urlparams | An array of safe url parameters and their variable types, for valid values see JFilterInput::clean(). |
Réimplémentée dans JControllerAdmin, JoomlaupdateControllerUpdate, TemplatesControllerSource, UsersController, CategoriesController, BannersControllerTracks, ContentController, FinderController, ConfigController, FinderController, LanguagesController, RedirectController, SearchController, TemplatesController, ContactController, ContentController, InstallerController, JoomlaupdateController, LoginController, MenusControllerMenu, WeblinksController, ContactController, MediaController, NewsfeedsController, SearchController, UsersController, WeblinksController, WrapperController, JInstallationController, BannersController, CacheController, MediaController, MenusController, MenusControllerMenus, MessagesController, ModulesController, NewsfeedsController, PluginsController, et CheckinController.
Références $app, $key, $view, JFactory\getApplication(), JFactory\getCache(), JRequest\getCmd(), JFactory\getConfig(), et JFactory\getDocument().
JController::execute | ( | $task | ) |
Execute a task by triggering a method in the derived class.
string | $task | The task to perform. If no matching task is found, the '__default' task is executed, if defined. |
Références $task, JText\_(), elseif, JError\raiseError(), JText\sprintf(), et task.
|
static |
Method to get a singleton controller instance.
string | $prefix | The prefix for the controller. |
array | $config | An array of optional constructor options. |
Exception | if the controller cannot be loaded. |
Références $class, $config, $file, $path, $task, $type, elseif, JFilterInput\getInstance(), JRequest\getVar(), JRequest\getWord(), null, JRequest\setVar(), et JText\sprintf().
Référencé par JInstallation\render().
JController::getModel | ( | $name = '' , |
|
$prefix = '' , |
|||
$config = array() |
|||
) |
Method to get a model object, loading it if required.
string | $name | The model name. Optional. |
string | $prefix | The class prefix. Optional. |
array | $config | Configuration array for model. Optional. |
Réimplémentée dans JControllerForm, ContentControllerArticle, WeblinksControllerWeblink, ContentControllerArticles, ContactControllerContacts, ContentControllerFeatured, TemplatesControllerSource, RedirectControllerLinks, ModulesControllerModules, UsersControllerUsers, TemplatesControllerStyles, BannersControllerBanners, MenusControllerMenus, UsersControllerNotes, BannersControllerClients, BannersControllerTracks, FinderControllerFilters, FinderControllerIndex, FinderControllerMaps, MessagesControllerMessages, PluginsControllerPlugins, LanguagesControllerLanguages, MenusControllerItems, CategoriesControllerCategories, WeblinksControllerWeblinks, NewsfeedsControllerNewsfeeds, et ContactControllerContact.
Références $app, $config, $item, $menu, $name, $params, JFactory\getApplication(), et task.
JController::getName | ( | ) |
Method to get the controller name
The dispatcher name is set by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor
Références $name, JText\_(), null, et JError\raiseError().
JController::getTask | ( | ) |
Get the last task that is being performed or was most recently performed.
Références $task.
JController::getTasks | ( | ) |
Gets the available tasks in the controller.
JController::getView | ( | $name = '' , |
|
$type = '' , |
|||
$prefix = '' , |
|||
$config = array() |
|||
) |
Method to get a reference to the current view and load it if necessary.
string | $name | The view name. Optional, defaults to the controller name. |
string | $type | The view type. Optional. |
string | $prefix | The class prefix. Optional. |
array | $config | Configuration array for view. Optional. |
Références $config, $name, $type, $view, JError\raiseError(), et JText\sprintf().
|
protected |
Method to add a record ID to the edit list.
string | $context | The context for the session storage. |
integer | $id | The ID of the record to add to the edit list. |
Références $app, $id, JLog\add(), JFactory\getApplication(), JLog\INFO, et JDEBUG.
JController::redirect | ( | ) |
Redirects the browser or returns false if no redirect is set.
Références $app, et JFactory\getApplication().
JController::registerDefaultTask | ( | $method | ) |
Register the default task to perform if a mapping is not found.
string | $method | 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.
string | $task | The task. |
string | $method | The name of the method in the derived class to perform for this task. |
Références $task.
|
protected |
Method to check whether an ID is in the edit list.
string | $context | The context for the session storage. |
integer | $id | The ID of the record to add to the edit list. |
Références $app, $id, JLog\add(), JFactory\getApplication(), JLog\INFO, et JDEBUG.
JController::setAccessControl | ( | $section, | |
$value = null |
|||
) |
Sets the access control levels.
string | $section | The ACO section (eg, the component). |
string | $value | The ACO section value (if using a constant value). |
Références JLog\add(), et JLog\WARNING.
JController::setMessage | ( | $text, | |
$type = 'message' |
|||
) |
|
protected |
Sets an entire array of search paths for resources.
string | $type | The type of path to set, typically 'view' or 'model'. |
string | $path | The new set of search paths. If null or false, resets to the current directory only. |
Set a URL for browser redirection.
string | $url | URL to redirect to. |
string | $msg | Message to display on redirect. Optional, defaults to value set internally by controller, if any. |
string | $type | Message type. Optional, defaults to 'message' or the type set by a previous call to setMessage. |
JController::unregisterTask | ( | $task | ) |
Unregister (unmap) a task in the class.
string | $task | The task. |
Références $task.
|
protected |
|
protected |
|
protected |
|
protected |
Réimplémentée dans FinderController, ConfigController, LanguagesController, RedirectController, SearchController, TemplatesController, ContactController, et ContentController.
|
protected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |