Class TemplatesModelStyle

Description

Template style model.

  • since: 1.6

Located in /administrator/components/com_templates/models/style.php (line 21)

JObject
   |
   --JModel
      |
      --JModelForm
         |
         --JModelAdmin
            |
            --TemplatesModelStyle
Variable Summary
string $helpKey
string $helpURL
mixed $_cache
Method Summary
void cleanCache ([ $group = null], [ $client_id = 0])
boolean delete (array &$pks)
boolean duplicate (array &$pks)
string generateNewTitle (integer $category_id, string $alias, string $title)
JForm getForm ([array $data = array()], [boolean $loadData = true])
object An getHelp ()
mixed getItem ([integer $pk = null])
JTable getTable ([type $type = 'Style'], [string $prefix = 'TemplatesTable'], [array $config = array()])
mixed loadFormData ()
void populateState ()
void preprocessForm (JForm $form, mixed $data, [ $group = 'content'])
boolean save (array $data)
boolean setHome ([int $id = 0])
boolean unsetHome ([int $id = 0])
Variables
string $helpKey = 'JHELP_EXTENSIONS_TEMPLATE_MANAGER_STYLES_EDIT' (line 27)
  • var: The help screen key for the module.
  • since: 1.6
  • access: protected
string $helpURL (line 33)
  • var: The help screen base URL for the module.
  • since: 1.6
  • access: protected
mixed $_cache = array() (line 38)

Item cache.

  • access: private

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
JModelAdmin::$text_prefix

Inherited from JModelForm

JModelForm::$_forms

Inherited from JModel

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

Inherited from JObject

JObject::$_errors
Methods
cleanCache (line 612)

Custom clean cache method

  • since: 1.6
  • access: protected
void cleanCache ([ $group = null], [ $client_id = 0])
  • $group
  • $client_id

Redefinition of:
JModel::cleanCache()
Clean the cache
delete (line 67)

Method to delete rows.

  • return: Returns true on success, false on failure.
  • access: public
boolean delete (array &$pks)
  • array &$pks: An array of item ids.

Redefinition of:
JModelAdmin::delete()
Method to delete one or more records.
duplicate (line 113)

Method to duplicate styles.

  • return: True if successful.
  • throws: Exception
  • access: public
boolean duplicate (array &$pks)
  • array &$pks: An array of primary key IDs.
generateNewTitle (line 164)

Method to change the title.

  • return: New title.
  • since: 1.7.1
  • access: protected
string generateNewTitle (integer $category_id, string $alias, string $title)
  • integer $category_id: The id of the category.
  • string $alias: The alias.
  • string $title: The title.

Redefinition of:
JModelAdmin::generateNewTitle()
Method to change the title & alias.
getForm (line 184)

Method to get the record form.

  • return: A JForm object on success, false on failure
  • since: 1.6
  • access: public
JForm getForm ([array $data = array()], [boolean $loadData = true])
  • array $data: An optional array of data for the form to interogate.
  • 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.
getHelp (line 602)

Get the necessary data to load an item help screen.

  • return: object with key, url, and local properties for loading the item help screen.
  • since: 1.6
  • access: public
object An getHelp ()
getItem (line 248)

Method to get a single record.

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

Redefinition of:
JModelAdmin::getItem()
Method to get a single record.
getTable (line 300)

Returns a reference to the a Table object, always creating it.

  • return: A database object
  • access: public
JTable getTable ([type $type = 'Style'], [string $prefix = 'TemplatesTable'], [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:
JModel::getTable()
Method to get a table object, load it if necessary.
loadFormData (line 229)

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.
populateState (line 47)

Method to auto-populate the model state.

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

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

Redefinition of:
JModelAdmin::populateState()
Stock method to auto-populate the model state.
preprocessForm (line 311)
  • throws: Exception if there is an error in the form event.
  • since: 1.6
  • access: protected
void preprocessForm (JForm $form, mixed $data, [ $group = 'content'])
  • object A $form: form object.
  • mixed $data: The data expected for the form.
  • $group

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

Method to save the form data.

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

Redefinition of:
JModelAdmin::save()
Method to save the form data.
setHome (line 490)

Method to set a template style as home.

  • return: True if successful.
  • throws: Exception
  • access: public
boolean setHome ([int $id = 0])
  • int $id: The primary key ID for the style.
unsetHome (line 550)

Method to unset a template style as default for a language.

  • return: True if successful.
  • throws: Exception
  • access: public
boolean unsetHome ([int $id = 0])
  • int $id: The primary key ID for the style.

Inherited Methods

Inherited From JModelAdmin

JModelAdmin::__construct()
JModelAdmin::batch()
JModelAdmin::batchAccess()
JModelAdmin::batchCopy()
JModelAdmin::batchLanguage()
JModelAdmin::batchMove()
JModelAdmin::canDelete()
JModelAdmin::canEditState()
JModelAdmin::checkin()
JModelAdmin::checkout()
JModelAdmin::delete()
JModelAdmin::generateNewTitle()
JModelAdmin::getItem()
JModelAdmin::getReorderConditions()
JModelAdmin::populateState()
JModelAdmin::prepareTable()
JModelAdmin::publish()
JModelAdmin::reorder()
JModelAdmin::save()
JModelAdmin::saveorder()

Inherited From JModelForm

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

Inherited From JModel

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

Inherited From JObject

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

Documentation generated on Mon, 25 Jun 2012 13:59:53 -0500 by phpDocumentor 1.4.4