Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($config=array()) | |
display ($tpl=null) | |
get ($property, $default=null) | |
getModel ($name=null) | |
setModel ($model, $default=false) | |
getName () | |
Fonctions membres publiques hérités de CMSObject | |
__construct ($properties=null) | |
__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) | |
Fonctions membres publiques hérités de DispatcherAwareInterface | |
setDispatcher (DispatcherInterface $dispatcher) | |
Champs de données | |
$document | |
Fonctions membres protégées | |
dispatchEvent (EventInterface $event) | |
Attributs protégés | |
$option = null | |
$_name = null | |
$_models = array() | |
$_defaultModel = null | |
Attributs protégés hérités de CMSObject | |
$_errors = array() | |
__construct | ( | $config = array() | ) |
Constructor
array | $config | A named configuration array for object construction. name: the name (optional) of the view (defaults to the view class name suffix). charset: the character set to use for display escape: the name (optional) of the function to use for escaping strings base_path: the parent path (optional) of the views directory (defaults to the component folder) template_plath: the path (optional) of the layout directory (defaults to base_path + /views/ + view name helper_path: the path (optional) of the helper files (defaults to base_path + /helpers/) layout: the layout (optional) to use to display the view |
Références $config.
|
protected |
Dispatches the given event on the internal dispatcher, does a fallback to the global one.
EventInterface | $event | The event |
Références class, Factory\getContainer(), Joomla\CMS\Application\getDispatcher(), et EventInterface\getName().
|
abstract |
Execute and display a template script.
string | $tpl | The name of the template file to parse; automatically searches through the template paths. |
Implémente ViewInterface.
get | ( | $property, | |
$default = null |
|||
) |
Method to get data from a registered model or a property of the view
string | $property | The name of the method to call on the model or the property to get |
string | $default | The name of the model to reference or the default value [optional] |
Références $default, $method, $model, Symfony\Contracts\Service\get(), et null.
getModel | ( | $name = null | ) |
Method to get the model object
string | $name | The name of the model (optional) |
Implémente ViewInterface.
getName | ( | ) |
Method to get the view name
The model name by default parsed using the classname, or it can be set by passing a $config['name'] in the class constructor
Références $className, $this, et Text\sprintf().
setModel | ( | $model, | |
$default = false |
|||
) |
Method to add a model to the view. We support a multiple model single view system by which models are referenced by classname. A caveat to the classname referencing is that any classname prepended by will be referenced by the name without , eg. is just Category.
BaseDatabaseModel | $model | The model to add to the view. |
boolean | $default | Is this the default model? |
|
protected |
|
protected |
|
protected |
$document |
|
protected |