Class ContactModelContact

Description

Item Model for a Contact.

  • since: 1.6

Located in /administrator/components/com_contact/models/contact.php (line 21)

JObject
   |
   --JModelLegacy
      |
      --JModelForm
         |
         --JModelAdmin
            |
            --ContactModelContact
Variable Summary
 string $typeAlias
Method Summary
 boolean batch (array $commands, array $pks, array $contexts)
 mixed batchCopy (integer $value, array $pks, array $contexts)
 boolean batchUser (integer $value, array $pks, array $contexts)
 boolean canDelete (object $record)
 boolean canEditState (object $record)
 boolean featured (array $pks, [integer $value = 0])
 array generateNewTitle ( $category_id, string $alias,  $name, integer $parent_id, string $title)
 mixed getForm ([array $data = array()], [boolean $loadData = true])
 mixed getItem ([integer $pk = null])
 array getReorderConditions (JTable $table)
 JTable getTable ([type $type = 'Contact'], [string $prefix = 'ContactTable'], [array $config = array()])
 mixed loadFormData ()
 void prepareTable (JTable $table)
 void preprocessForm (JForm $form,  $data, [ $group = 'content'])
 boolean save (array $data)
Variables
Methods
batch (line 42)

Method to perform batch operations on an item or a set of items.

  • return: Returns true on success, false on failure.
  • since: 2.5
  • access: public
boolean batch (array $commands, array $pks, array $contexts)
  • array $commands: An array of commands to perform.
  • array $pks: An array of item ids.
  • array $contexts: An array of item contexts.

Redefinition of:
JModelAdmin::batch()
Method to perform batch operations on an item or a set of items.
batchCopy (line 172)

Batch copy items to a new category or current.

  • return: An array of new IDs on success, boolean false on failure.
  • since: 11.1
  • access: protected
mixed batchCopy (integer $value, array $pks, array $contexts)
  • integer $value: The new category.
  • array $pks: An array of row IDs.
  • array $contexts: An array of item contexts.

Redefinition of:
JModelAdmin::batchCopy()
Batch copy items to a new category or current.
batchUser (line 264)

Batch change a linked user.

  • return: True if successful, false otherwise and internal error is set.
  • since: 2.5
  • access: protected
boolean batchUser (integer $value, array $pks, array $contexts)
  • integer $value: The new value matching a User ID.
  • array $pks: An array of row IDs.
  • array $contexts: An array of item contexts.
canDelete (line 305)

Method to test whether a record can be deleted.

  • return: True if allowed to delete the record. Defaults to the permission set in the component.
  • since: 1.6
  • access: protected
boolean canDelete (object $record)
  • object $record: A record object.
canEditState (line 326)

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

  • return: True if allowed to change the state of the record. Defaults to the permission set in the component.
  • since: 1.6
  • access: protected
boolean canEditState (object $record)
  • object $record: A record object.
featured (line 692)

Method to toggle the featured setting of contacts.

  • return: True on success.
  • since: 1.6
  • access: public
boolean featured (array $pks, [integer $value = 0])
  • array $pks: The ids of the items to toggle.
  • integer $value: The value to toggle to.
generateNewTitle (line 743)

Method to change the title & alias.

  • return: Contains the modified title and alias.
  • since: 3.1
  • access: protected
array generateNewTitle ( $category_id, string $alias,  $name, integer $parent_id, string $title)
  • integer $parent_id: The id of the parent.
  • string $alias: The alias.
  • string $title: The title.
  • $category_id
  • $name
getForm (line 366)

Method to get the row form.

  • return: A JForm object on success, false on failure
  • since: 1.6
  • access: public
mixed getForm ([array $data = array()], [boolean $loadData = true])
  • array $data: Data for the form.
  • boolean $loadData: True if the form is to load its own data (default case), false if not.

Redefinition of:
JModelForm::getForm()
Abstract method for getting the form from the model.
getItem (line 403)

Method to get a single record.

  • return: Object on success, false on failure.
  • since: 1.6
  • access: public
mixed getItem ([integer $pk = null])
  • integer $pk: The id of the primary key.
getReorderConditions (line 632)

A protected method to get a set of ordering conditions.

  • return: An array of conditions to add to add to ordering queries.
  • since: 1.6
  • access: protected
array getReorderConditions (JTable $table)
  • JTable $table: A record object.
getTable (line 352)

Returns a Table object, always creating it

  • return: A database object
  • since: 1.6
  • access: public
JTable getTable ([type $type = 'Contact'], [string $prefix = 'ContactTable'], [array $config = array()])
  • type $type: The table type to instantiate
  • string $prefix: A prefix for the table class name. Optional.
  • array $config: Configuration array for model. Optional.

Redefinition of:
JModelLegacy::getTable()
Method to get a table object, load it if necessary.
loadFormData (line 448)

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

  • return: The data for the form.
  • since: 1.6
  • access: protected
mixed loadFormData ()

Redefinition of:
JModelForm::loadFormData()
Method to get the data that should be injected in the form.
prepareTable (line 583)

Prepare and sanitise the table prior to saving.

  • since: 1.6
  • access: protected
void prepareTable (JTable $table)
preprocessForm (line 640)
  • access: protected
void preprocessForm (JForm $form,  $data, [ $group = 'content'])
  • JForm $form
  • $data
  • $group

Redefinition of:
JModelForm::preprocessForm()
Method to allow derived classes to preprocess the form.
save (line 478)

Method to save the form data.

  • return: True on success.
  • since: 3.0
  • access: public
boolean save (array $data)
  • array $data: The form data.

Inherited Methods

Inherited From JModelAdmin

 JModelAdmin::__construct()
 JModelAdmin::batch()
 JModelAdmin::batchAccess()
 JModelAdmin::batchCopy()

Inherited From JModelForm

 JModelForm::checkin()
 JModelForm::checkout()
 JModelForm::getForm()
 JModelForm::loadForm()
 JModelForm::loadFormData()
 JModelForm::preprocessData()
 JModelForm::preprocessForm()
 JModelForm::validate()

Inherited From JModelLegacy

 JModelLegacy::__construct()
 JModelLegacy::addIncludePath()
 JModelLegacy::addTablePath()
 JModelLegacy::cleanCache()
 JModelLegacy::getDbo()
 JModelLegacy::getInstance()
 JModelLegacy::getName()
 JModelLegacy::getState()
 JModelLegacy::getTable()
 JModelLegacy::loadHistory()
 JModelLegacy::populateState()
 JModelLegacy::setDbo()
 JModelLegacy::setState()
 JModelLegacy::_createFileName()
 JModelLegacy::_createTable()
 JModelLegacy::_getList()
 JModelLegacy::_getListCount()

Inherited From JObject

 JObject::__construct()
 JObject::def()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::__toString()

Documentation generated on Tue, 19 Nov 2013 14:56:40 +0100 by phpDocumentor 1.4.3