Back to UCMBase class

Method mapBase

public array
mapBase
(mixed $original, \Joomla\CMS\UCM\UCMType $type = null)
Method to map the base ucm fields
Parameters
  • array $original Data array
  • \Joomla\CMS\UCM\UCMType $type UCM Content Type
Returns
  • array Data array of UCM mappings
Since
  • 3.1
Class: UCMBase
Project: Joomla

Method mapBase - Source code

/**
 * Method to map the base ucm fields
 *
 * @param   array    $original  Data array
 * @param   UCMType  $type      UCM Content Type
 *
 * @return  array  Data array of UCM mappings
 *
 * @since   3.1
 */
public function mapBase($original, UCMType $type = null)
{
    $type = $type ?: $this->type;
    $data = array('ucm_type_id' => $type->id, 'ucm_item_id' => $original[$type->primary_key], 'ucm_language_id' => ContentHelper::getLanguageId($original['language']));
    return $data;
}