Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe NewsfeedsModelNewsfeed
+ Graphe d'héritage de NewsfeedsModelNewsfeed:

Fonctions membres publiques

 getTable ($type='Newsfeed', $prefix='NewsfeedsTable', $config=array())
 
 getForm ($data=array(), $loadData=true)
 
 save ($data)
 
 getItem ($pk=null)
 
 publish (&$pks, $value=1)
 
 validate ($form, $data, $group=null)
 
getItem ($pk=null)
 
 hit ($pk=0)
 

Champs de données

 $typeAlias = 'com_newsfeeds.newsfeed'
 

Fonctions membres protégées

 canDelete ($record)
 
 canEditState ($record)
 
 loadFormData ()
 
 prepareTable ($table)
 
 getReorderConditions ($table)
 
 preprocessForm (JForm $form, $data, $group='content')
 
 populateState ()
 

Attributs protégés

 $associationsContext = 'com_newsfeeds.item'
 
 $text_prefix = 'COM_NEWSFEEDS'
 
 $_context = 'com_newsfeeds.newsfeed'
 

Fonctions membres privées

 canCreateCategory ()
 

Description détaillée

Newsfeed model.

Depuis
1.6

Newsfeeds Component Newsfeed Model

Depuis
1.5

Documentation des fonctions membres

◆ canCreateCategory()

canCreateCategory ( )
private

Is the user allowed to create an on the fly category?

Renvoie
boolean
Depuis
3.6.1

◆ canDelete()

canDelete (   $record)
protected

Method to test whether a record can be deleted.

Paramètres
object$recordA record object.
Renvoie
boolean True if allowed to delete the record. Defaults to the permission set in the component.
Depuis
1.6

◆ canEditState()

canEditState (   $record)
protected

Method to test whether a record can have its state changed.

Paramètres
object$recordA record object.
Renvoie
boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
Depuis
1.6

◆ getForm()

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

Method to get the record form.

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

Références $data, et $form.

◆ getItem() [1/2]

& getItem (   $pk = null)

Method to get newsfeed data.

Paramètres
integer$pkThe id of the newsfeed.
Renvoie
mixed Menu item data object on success, false on failure.
Depuis
1.6

Références $data, $db, $groups, $published, $query, $user, null, et JError\raiseError().

◆ getItem() [2/2]

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.
Depuis
1.6

Références $app, $assoc, $item, et null.

◆ getReorderConditions()

getReorderConditions (   $table)
protected

A protected method to get a set of ordering conditions.

Paramètres
object$tableA record object.
Renvoie
array An array of conditions to add to add to ordering queries.
Depuis
1.6

Références $condition.

◆ getTable()

getTable (   $type = 'Newsfeed',
  $prefix = 'NewsfeedsTable',
  $config = array() 
)

Returns a Table object, always creating it.

Paramètres
string$typeThe table type to instantiate
string$prefixA prefix for the table class name. Optional.
array$configConfiguration array for model. Optional.
Renvoie
JTable A database object
Depuis
1.6

Références $config, $prefix, et $type.

◆ hit()

hit (   $pk = 0)

Increment the hit counter for the newsfeed.

Paramètres
int$pkOptional primary key of the item to increment.
Renvoie
boolean True if successful; false otherwise and internal error set.
Depuis
3.0

Références $input.

◆ 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 $app, et $data.

◆ 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, $offset, $params, et $user.

◆ prepareTable()

prepareTable (   $table)
protected

Prepare and sanitise the table prior to saving.

Paramètres
JTable$tableThe table object
Renvoie
void

Références $date, $db, $query, $user, et ENT_QUOTES.

◆ preprocessForm()

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

A protected method to get a set of ordering conditions.

Paramètres
JForm$formThe form object.
array$dataThe data to be injected into the form
string$groupThe plugin group to process
Renvoie
array An array of conditions to add to add to ordering queries.
Depuis
1.6

Références $data, $field, $fields, $form, $language, et null.

◆ publish()

publish ( $pks,
  $value = 1 
)

Method to change the published state of one or more records.

Paramètres
array&$pksA list of the primary keys to change.
integer$valueThe value of the published state.
Renvoie
boolean True on success.
Depuis
1.6

Références $value.

◆ save()

save (   $data)

Method to save the form data.

Paramètres
array$dataThe form data.
Renvoie
boolean True on success.
Depuis
3.0

Références $data, $input, $name, CategoriesHelper\createCategory(), JPATH_ADMINISTRATOR, JLoader\register(), et CategoriesHelper\validateCategoryId().

◆ validate()

validate (   $form,
  $data,
  $group = null 
)

Method to validate the form data.

Paramètres
JForm$formThe form to validate against.
array$dataThe data to validate.
string$groupThe name of the field group to validate.
Renvoie
array|boolean Array of filtered data if valid, false otherwise.
Voir également
JFormRule
JFilterInput
Depuis
3.9.25

Références $data, $form, et validate().

Documentation des champs

◆ $_context

$_context = 'com_newsfeeds.newsfeed'
protected

◆ $associationsContext

$associationsContext = 'com_newsfeeds.item'
protected

◆ $text_prefix

$text_prefix = 'COM_NEWSFEEDS'
protected

◆ $typeAlias

$typeAlias = 'com_newsfeeds.newsfeed'

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