Back to UCMContent class

Method save

public bool
save
(mixed $original = null, \Joomla\CMS\UCM\UCMType $type = null)
Method to save the data
Parameters
  • array $original The original data to be saved
  • \Joomla\CMS\UCM\UCMType $type The UCM Type object
Returns
  • bool true
Since
  • 3.1
Class: UCMContent
Project: Joomla

Method save - Source code

/**
 * Method to save the data
 *
 * @param   array    $original  The original data to be saved
 * @param   UCMType  $type      The UCM Type object
 *
 * @return  boolean  true
 *
 * @since   3.1
 */
public function save($original = null, UCMType $type = null)
{
    $type = $type ?: $this->type;
    $ucmData = $original ? $this->mapData($original, $type) : $this->ucmData;
    // Store the Common fields
    $this->store($ucmData['common']);
    // Store the special fields
    if (isset($ucmData['special'])) {
        $table = $this->table;
        $this->store($ucmData['special'], $table, '');
    }
    return true;
}