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é
Référence de la classe ContactModelContact
+ Graphe d'héritage de ContactModelContact:

Fonctions membres publiques

 getTable ($type='Contact', $prefix='ContactTable', $config=array())
 
 getForm ($data=array(), $loadData=true)
 
 getItem ($pk=null)
 
 save ($data)
 
 featured ($pks, $value=0)
 
 validate ($form, $data, $group=null)
 
 getForm ($data=array(), $loadData=true)
 
getItem ($pk=null)
 
 hit ($pk=0)
 

Champs de données

 $typeAlias = 'com_contact.contact'
 

Fonctions membres protégées

 batchUser ($value, $pks, $contexts)
 
 canDelete ($record)
 
 canEditState ($record)
 
 loadFormData ()
 
 prepareTable ($table)
 
 getReorderConditions ($table)
 
 preprocessForm (JForm $form, $data, $group='content')
 
 populateState ()
 
 loadFormData ()
 
 buildContactExtendedData ($contact)
 
 getContactQuery ($pk=null)
 

Attributs protégés

 $associationsContext = 'com_contact.item'
 
 $batch_copymove = 'category_id'
 
 $batch_commands
 
 $view_item = 'contact'
 
 $_item = null
 
 $_context = 'com_contact.contact'
 

Fonctions membres privées

 canCreateCategory ()
 

Description détaillée

Item Model for a Contact.

Depuis
1.6

Documentation des fonctions membres

◆ batchUser()

batchUser (   $value,
  $pks,
  $contexts 
)
protected

Batch change a linked user.

Paramètres
integer$valueThe new value matching a User ID.
array$pksAn array of row IDs.
array$contextsAn array of item contexts.
Renvoie
boolean True if successful, false otherwise and internal error is set.
Depuis
2.5

Références $value.

◆ buildContactExtendedData()

buildContactExtendedData (   $contact)
protected

Load extended data (profile, articles) for a contact

Paramètres
object$contactThe contact object
Renvoie
void

Références $data, $db, $dispatcher, $form, $groups, $published, $query, $user, JEventDispatcher\getInstance(), JPATH_ADMINISTRATOR, JPATH_SITE, et null.

◆ 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 edited.

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

◆ featured()

featured (   $pks,
  $value = 0 
)

Method to toggle the featured setting of contacts.

Paramètres
array$pksThe ids of the items to toggle.
integer$valueThe value to toggle to.
Renvoie
boolean True on success.
Depuis
1.6

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

◆ getContactQuery()

getContactQuery (   $pk = null)
protected

Gets the query to load a contact item

Paramètres
integer$pkThe item to be loaded
Renvoie
mixed The contact object on success, false on failure
Exceptions
ExceptionOn database failure
Obsolète:
4.0 Use ContactModelContact::getItem() instead

Références $data, $db, $dispatcher, $form, $groups, $published, $query, $user, JEventDispatcher\getInstance(), JPATH_ADMINISTRATOR, et null.

◆ getForm() [1/2]

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

Method to get the contact form. The base form is loaded from XML and then an event is fired

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
JForm A JForm object on success, false on failure
Depuis
1.6

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

◆ getForm() [2/2]

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

Method to get the row 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|boolean A JForm object on success, false on failure
Depuis
1.6

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

◆ getItem() [1/2]

& getItem (   $pk = null)

Gets a contact

Paramètres
integer$pkId for the contact
Renvoie
mixed Object or null
Depuis
1.6.0

In case some entity params have been set to "use global", those are represented as an empty string and must be "overridden" by merging the component and / or menu params here.

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 $assoc, $item, et null.

◆ getReorderConditions()

getReorderConditions (   $table)
protected

A protected method to get a set of ordering conditions.

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

◆ getTable()

getTable (   $type = 'Contact',
  $prefix = 'ContactTable',
  $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 contact.

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

Références $input.

◆ loadFormData() [1/2]

loadFormData ( )
protected

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

Renvoie
array The default data is an empty array.
Depuis
1.6.2

Références $data.

◆ loadFormData() [2/2]

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

◆ prepareTable()

prepareTable (   $table)
protected

Prepare and sanitise the table prior to saving.

Paramètres
JTable$tableThe JTable object
Renvoie
void
Depuis
1.6

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

◆ preprocessForm()

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

Preprocess the form.

Paramètres
JForm$formForm object.
object$dataData object.
string$groupGroup name.
Renvoie
void
Depuis
3.0.3

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

◆ 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, $link, $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_contact.contact'
protected

◆ $_item

$_item = null
protected

A loaded item

Depuis
1.6

◆ $associationsContext

$associationsContext = 'com_contact.item'
protected

◆ $batch_commands

$batch_commands
protected
Valeur initiale :
= array(
'assetgroup_id' => 'batchAccess',
'language_id' => 'batchLanguage',
'tag' => 'batchTag',
'user_id' => 'batchUser',
)

◆ $batch_copymove

$batch_copymove = 'category_id'
protected

◆ $typeAlias

$typeAlias = 'com_contact.contact'

◆ $view_item

$view_item = 'contact'
protected

The name of the view for a single item

Depuis
1.6

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