Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe StyleModel
+ Graphe d'héritage de StyleModel:

Fonctions membres publiques

 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 delete (&$pks)
 
 duplicate (&$pks)
 
 getForm ($data=array(), $loadData=true)
 
 getItem ($pk=null)
 
 save ($data)
 
 setHome ($id=0)
 
 unsetHome ($id=0)
 
 getHelp ()
 
 getAdminTemplate (int $styleId)
 
 getSiteTemplates ()
 
- Fonctions membres publiques hérités de AdminModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 batch ($commands, $pks, $contexts)
 
 checkin ($pks=array())
 
 checkout ($pk=null)
 
 delete (&$pks)
 
 getItem ($pk=null)
 
 publish (&$pks, $value=1)
 
 reorder ($pks, $delta=0)
 
 save ($data)
 
 saveorder ($pks=array(), $order=null)
 
 generateTitle ($categoryId, $table)
 
 initBatch ()
 
 editAssociations ($data)
 
- Fonctions membres publiques hérités de FormModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 checkin ($pk=null)
 
 checkout ($pk=null)
 
 validate ($form, $data, $group=null)
 
- Fonctions membres publiques hérités de BaseDatabaseModel
 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getTable ($name='', $prefix='', $options=array())
 
 isCheckedOut ($item)
 
 getDbo ()
 
 setDbo (DatabaseInterface $db=null)
 
 __get ($name)
 
- Fonctions membres publiques hérités de BaseModel
 __construct ($config=array())
 
 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 StatefulModelInterface
 getState ($property=null, $default=null)
 
 setState ($property, $value=null)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de CurrentUserInterface
 setCurrentUser (User $currentUser)
 
- Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface
 setCacheControllerFactory (CacheControllerFactoryInterface $factory)
 
- Fonctions membres publiques hérités de DatabaseAwareInterface
 setDatabase (DatabaseInterface $db)
 
- Fonctions membres publiques hérités de FormFactoryAwareInterface
 setFormFactory (FormFactoryInterface $factory)
 

Fonctions membres protégées

 populateState ()
 
 generateNewTitle ($categoryId, $alias, $title)
 
 loadFormData ()
 
 preprocessForm (Form $form, $data, $group='content')
 
 cleanCache ($group=null, $clientId=0)
 
- Fonctions membres protégées hérités de AdminModel
 batchAccess ($value, $pks, $contexts)
 
 batchCopy ($value, $pks, $contexts)
 
 cleanupPostBatchCopy (TableInterface $table, $newId, $oldId)
 
 batchLanguage ($value, $pks, $contexts)
 
 batchMove ($value, $pks, $contexts)
 
 batchTag ($value, $pks, $contexts)
 
 canDelete ($record)
 
 canEditState ($record)
 
 generateNewTitle ($categoryId, $alias, $title)
 
 getReorderConditions ($table)
 
 populateState ()
 
 prepareTable ($table)
 
 checkCategoryId ($categoryId)
 
 redirectToAssociations ($data)
 
- Fonctions membres protégées hérités de BaseDatabaseModel
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
 _createTable ($name, $prefix='Table', $config=array())
 
 bootComponent ($component)
 
 dispatchEvent (EventInterface $event)
 

Attributs protégés

 $helpKey = 'Templates:_Edit_Style'
 
 $helpURL
 
- Attributs protégés hérités de AdminModel
 $text_prefix = null
 
 $event_after_delete = null
 
 $event_after_save = null
 
 $event_before_delete = null
 
 $event_before_save = null
 
 $event_before_change_state = null
 
 $event_change_state = null
 
 $event_before_batch = null
 
 $batch_copymove = 'category_id'
 
 $batch_commands
 
 $associationsContext = null
 
 $batchSet = null
 
 $user = null
 
 $table = null
 
 $tableClassName = null
 
 $contentType = null
 
 $type = null
 
- Attributs protégés hérités de FormModel
 $events_map = null
 
- Attributs protégés hérités de BaseDatabaseModel
 $option = null
 
 $event_clean_cache = null
 
- Attributs protégés hérités de BaseModel
 $name
 
- Attributs protégés hérités de CMSObject
 $_errors = array()
 

Attributs privés

 $_cache = array()
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseModel
static addIncludePath ($path='', $prefix='')
 
- Champs de données hérités de AdminModel
 $typeAlias
 
- Attributs protégés statiques hérités de BaseModel
static $paths
 

Description détaillée

Template style model.

Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array(),
MVCFactoryInterface  $factory = null 
)

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.
MVCFactoryInterface$factoryThe factory.
Voir également
Depuis
3.2

Références $config, et Symfony\Contracts\Service\__construct().

Documentation des fonctions membres

◆ cleanCache()

cleanCache (   $group = null,
  $clientId = 0 
)
protected

Custom clean cache method

Paramètres
string$groupThe cache group
integer$clientId

◆ delete()

delete ( $pks)

Method to delete rows.

Paramètres
array&$pksAn array of item ids.
Renvoie
boolean Returns true on success, false on failure.
Depuis
1.6
Exceptions

Références $context, $name, $result, $user, Text\_(), Factory\getApplication(), Factory\getUser(), et PluginHelper\importPlugin().

◆ duplicate()

duplicate ( $pks)

Method to duplicate styles.

Paramètres
array&$pksAn array of primary key IDs.
Renvoie
boolean True if successful.
Exceptions

Références $context, $name, $result, $user, Text\_(), Factory\getApplication(), Factory\getUser(), PluginHelper\importPlugin(), et null.

◆ generateNewTitle()

generateNewTitle (   $categoryId,
  $alias,
  $title 
)
protected

Method to change the title.

Paramètres
integer$categoryIdThe id of the category.
string$aliasThe alias.
string$titleThe title.
Renvoie
string New title.
Depuis
1.7.1

Références $title, et StringHelper\increment().

◆ getAdminTemplate()

getAdminTemplate ( int  $styleId)

Returns the back end template for the given style.

Paramètres
int$styleIdThe style id
Renvoie
stdClass
Depuis
4.2.0

Références $db, $query, Joomla\Database\getDatabase(), et ParameterType\INTEGER.

◆ getForm()

getForm (   $data = array(),
  $loadData = true 
)

Method to get the record form.

Paramètres
array$dataAn optional array of data for the form to interrogate.
boolean$loadDataTrue if the form is to load its own data (default case), false if not.
Renvoie
Form A Form object on success, false on failure
Depuis
1.6

Implémente FormModelInterface.

Références $clientId, $data, $form, $item, $template, Form\addFieldPath(), ArrayHelper\getValue(), JPATH_ADMINISTRATOR, JPATH_SITE, Joomla\CMS\MVC\Model\loadForm(), et Joomla\CMS\MVC\Model\setState().

◆ getHelp()

getHelp ( )

Get the necessary data to load an item help screen.

Renvoie
object An object with key, url, and local properties for loading the item help screen.
Depuis
1.6

◆ getItem()

getItem (   $pk = null)

Method to get a single record.

Paramètres
integer$pkThe id of the primary key.
Renvoie
mixed Object on success, false on failure.

Références $client, $path, $return, class, Path\clean(), ApplicationHelper\getClientInfo(), Joomla\CMS\MVC\Model\getState(), null, et ArrayHelper\toObject().

◆ getSiteTemplates()

getSiteTemplates ( )

Returns the front end templates.

Renvoie
array
Depuis
4.2.0

Références $db, $query, et Joomla\Database\getDatabase().

◆ loadFormData()

loadFormData ( )
protected

Method to get the data that should be injected in the form.

Renvoie
mixed The data for the form.
Depuis
1.6

Références $data, Factory\getApplication(), et Joomla\CMS\MVC\Model\preprocessData().

◆ populateState()

populateState ( )
protected

Method to auto-populate the model state.

Note
Calling getState in this method will result in recursion.
Renvoie
void
Depuis
1.6

Références $app, $params, Factory\getApplication(), ComponentHelper\getParams(), et Joomla\CMS\MVC\Model\setState().

◆ preprocessForm()

preprocessForm ( Form  $form,
  $data,
  $group = 'content' 
)
protected

Method to allow derived classes to preprocess the form.

Paramètres
Form$formA Form object.
mixed$dataThe data expected for the form.
string$groupThe name of the plugin group to import (defaults to "content").
Renvoie
void
Depuis
1.6
Exceptions

Références $client, $clientId, $data, $form, $helpURL, $lang, $template, $xml, Text\_(), Path\clean(), ApplicationHelper\getClientInfo(), Factory\getLanguage(), Joomla\CMS\MVC\Model\getState(), Multilanguage\isEnabled(), Form\loadFile(), et Joomla\CMS\MVC\Model\preprocessForm().

◆ save()

◆ setHome()

setHome (   $id = 0)

Method to set a template style as home.

Paramètres
integer$idThe primary key ID for the style.
Renvoie
boolean True if successful.
Exceptions

Références $clientId, $db, $extension, $id, $query, $style, $user, Text\_(), Joomla\Database\getDatabase(), Table\getInstance(), Factory\getUser(), et ParameterType\INTEGER.

◆ unsetHome()

unsetHome (   $id = 0)

Method to unset a template style as default for a language.

Paramètres
integer$idThe primary key ID for the style.
Renvoie
boolean True if successful.
Exceptions

Références $db, $id, $query, $style, $user, Text\_(), elseif, Joomla\Database\getDatabase(), Factory\getUser(), et ParameterType\INTEGER.

Documentation des champs

◆ $_cache

$_cache = array()
private

◆ $helpKey

$helpKey = 'Templates:_Edit_Style'
protected

◆ $helpURL

$helpURL
protected

La documentation de cette classe a été générée à partir du fichier suivant :