Back to ContentType class

Method store

public bool
store
(mixed $updateNulls = false)
Overridden Table::store.
Parameters
  • bool $updateNulls True to update fields even if they are null.
Returns
  • bool True on success.
Since
  • 3.1
Class: ContentType
Project: Joomla

Method store - Source code

/**
 * Overridden Table::store.
 *
 * @param   boolean  $updateNulls  True to update fields even if they are null.
 *
 * @return  boolean  True on success.
 *
 * @since   3.1
 */
public function store($updateNulls = false)
{
    // Verify that the alias is unique
    $table = Table::getInstance('Contenttype', 'JTable', array('dbo' => $this->getDbo()));
    if ($table->load(array('type_alias' => $this->type_alias)) && ($table->type_id != $this->type_id || $this->type_id == 0)) {
        $this->setError(Text::_('COM_TAGS_ERROR_UNIQUE_ALIAS'));
        return false;
    }
    return parent::store($updateNulls);
}