Class TagsModelTag

Description

Tags Component Tag Model

  • since: 3.1

Located in /administrator/components/com_tags/models/tag.php (line 19)

JObject
   |
   --JModelLegacy
      |
      --JModelForm
         |
         --JModelAdmin
            |
            --TagsModelTag
Variable Summary
 string $text_prefix
 string $typeAlias
Method Summary
 boolean canDelete (object $record)
 boolean canEditState (object $record)
 array generateNewTitle (integer $parent_id, string $alias, string $title)
 mixed getForm ([array $data = array()], [boolean $loadData = true])
 mixed getItem ([integer $pk = null])
 JTable getTable ([string $type = 'Tag'], [string $prefix = 'TagsTable'], [array $config = array()])
 mixed loadFormData ()
 void populateState ()
 void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
 boolean rebuild ()
 boolean save (array $data)
 boolean saveorder ([array $idArray = null], [integer $lft_array = null])
Variables
string $text_prefix = 'COM_TAGS' (line 25)
  • var: The prefix to use with controller messages.
  • since: 3.1
  • access: protected

Redefinition of:
JModelAdmin::$text_prefix
The prefix to use with controller messages.
string $typeAlias = 'com_tags.tag' (line 31)
  • var: The type alias for this content type.
  • since: 3.2
  • access: public

Inherited Variables

Inherited from JModelAdmin

JModelAdmin::$event_after_delete
JModelAdmin::$event_after_save
JModelAdmin::$event_before_delete
JModelAdmin::$event_before_save
JModelAdmin::$event_change_state

Inherited from JModelForm

JModelForm::$_forms

Inherited from JModelLegacy

JModelLegacy::$event_clean_cache
JModelLegacy::$name
JModelLegacy::$option
JModelLegacy::$state
JModelLegacy::$_db
JModelLegacy::$__state_set

Inherited from JObject

JObject::$_errors
Methods
canDelete (line 42)

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: 3.1
  • access: protected
boolean canDelete (object $record)
  • object $record: A record object.
canEditState (line 63)

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

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

Method to change the title & alias.

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

Method to get the row form.

  • return: A JForm object on success, false on failure
  • since: 3.1
  • 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 118)

Method to get a tag.

  • return: Tag data object on success, false on failure.
  • since: 3.1
  • access: public
mixed getItem ([integer $pk = null])
  • integer $pk: An optional id of the object to get, otherwise the id from the model state is used.
getTable (line 79)

Method to get a table object, load it if necessary.

  • return: A JTable object
  • since: 3.1
  • access: public
JTable getTable ([string $type = 'Tag'], [string $prefix = 'TagsTable'], [array $config = array()])
  • string $type: The table name. Optional.
  • string $prefix: The class prefix. Optional.
  • array $config: Configuration array for model. Optional.

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

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

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

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

Auto-populate the model state.

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

  • since: 3.1
  • access: protected
void populateState ()

Redefinition of:
JModelLegacy::populateState()
Method to auto-populate the model state.
preprocessForm (line 245)

Method to preprocess the form.

  • see: JFormField
  • throws: Exception if there is an error in the form event.
  • since: 3.1
  • access: protected
void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
  • JForm $form: A JForm object.
  • mixed $data: The data expected for the form.
  • string $group: The name of the plugin group to import.

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

Method rebuild the entire nested set tree.

  • return: False on failure or error, true otherwise.
  • since: 3.1
  • access: public
boolean rebuild ()
save (line 260)

Method to save the form data.

  • return: True on success.
  • since: 3.1
  • access: public
boolean save (array $data)
  • array $data: The form data.
saveorder (line 404)

Method to save the reordered nested set tree.

First we save the new order values in the lft values of the changed ids. Then we invoke the table rebuild to implement the new ordering.

  • return: False on failure or error, True otherwise
  • since: 3.1
  • access: public
boolean saveorder ([array $idArray = null], [integer $lft_array = null])
  • array $idArray: An array of primary key ids.
  • integer $lft_array: The lft value

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 15:15:10 +0100 by phpDocumentor 1.4.3