Joomla CMS  3.8.5 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.8.5 et du framework Joomla Platform intégré
Référence de la classe ContentModelArticles
+ Graphe d'héritage de ContentModelArticles:

Fonctions membres publiques

 __construct ($config=array())
 
 getAuthors ()
 
 getItems ()
 
 __construct ($config=array())
 
 getItems ()
 
 getStart ()
 

Fonctions membres protégées

 populateState ($ordering='a.id', $direction='desc')
 
 getStoreId ($id='')
 
 getListQuery ()
 
 populateState ($ordering='ordering', $direction='ASC')
 
 getStoreId ($id='')
 
 getListQuery ()
 

Description détaillée

Methods supporting a list of article records.

Depuis
1.6

This models supports retrieving lists of articles.

Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct() [1/2]

__construct (   $config = array())

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.
Depuis
1.6
Voir également
JControllerLegacy

Références $config.

◆ __construct() [2/2]

__construct (   $config = array())

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.
Voir également
JController
Depuis
1.6

Références $config.

Documentation des fonctions membres

◆ getAuthors()

getAuthors ( )

Build a list of authors

Renvoie
stdClass
Depuis
1.6

Références $db, et $query.

◆ getItems() [1/2]

getItems ( )

Method to get a list of articles. Overridden to add a check for access levels.

Renvoie
mixed An array of data items on success, false on failure.
Depuis
1.6.1

Références $groups, et $items.

◆ getItems() [2/2]

getItems ( )

Method to get a list of articles.

Overriden to inject convert the attribs field into a JParameter object.

Renvoie
mixed An array of objects on success, false on failure.
Depuis
1.6

For blogs, article params override menu item params only if menu param = 'use_article' Otherwise, menu item params control the layout If menu item is 'use_article' and there is no article param, use global

Compute the asset access permissions. Technically guest could edit an article, but lets not check that to improve performance a little.

Références $asset, $groups, $input, $item, $items, $key, $user, $userId, $value, ContentHelperAssociation\displayAssociations(), elseif, et null.

◆ getListQuery() [1/2]

getListQuery ( )
protected

Build an SQL query to load the list data.

Renvoie
JDatabaseQuery
Depuis
1.6

Références $db, $groups, $language, $published, $query, $type, $user, et elseif.

◆ getListQuery() [2/2]

getListQuery ( )
protected

Get the master query for retrieving a list of articles subject to the model state.

Renvoie
JDatabaseQuery
Depuis
1.6

If category is archived then article has to be published or archived. Or categogy is published then article has to be archived.

Références $articleId, $db, $filter, $groups, $key, $params, $published, $query, $type, $user, et elseif.

◆ getStart()

getStart ( )

Method to get the starting number of items for the data set.

Renvoie
integer The starting number of items available in the data set.
Depuis
12.2

◆ getStoreId() [1/2]

getStoreId (   $id = '')
protected

Method to get a store id based on model configuration state.

This is necessary because the model is used by the component and different modules that might need different sets of data or different ordering requirements.

Paramètres
string$idA prefix for the store id.
Renvoie
string A store id.
Depuis
1.6

Références $id.

◆ getStoreId() [2/2]

getStoreId (   $id = '')
protected

Method to get a store id based on model configuration state.

This is necessary because the model is used by the component and different modules that might need different sets of data or different ordering requirements.

Paramètres
string$idA prefix for the store id.
Renvoie
string A store id.
Depuis
1.6

Références $id.

◆ populateState() [1/2]

populateState (   $ordering = 'ordering',
  $direction = 'ASC' 
)
protected

Method to auto-populate the model state.

This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.

Note. Calling getState in this method will result in recursion.

Paramètres
string$orderingAn optional ordering field.
string$directionAn optional direction (asc|desc).
Renvoie
void
Depuis
12.2

Références $app, $listOrder, $params, $user, et $value.

◆ populateState() [2/2]

populateState (   $ordering = 'a.id',
  $direction = 'desc' 
)
protected

Method to auto-populate the model state.

Note. Calling getState in this method will result in recursion.

Paramètres
string$orderingAn optional ordering field.
string$directionAn optional direction (asc|desc).
Renvoie
void
Depuis
1.6

Références $app, $direction, $forcedLanguage, $language, $layout, $ordering, et $published.


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