Back to ContenthistoryField class

Method getLayoutData

public array
getLayoutData
()
Get the data that is going to be passed to the layout
Returns
  • array

Method getLayoutData - Source code

/**
 * Get the data that is going to be passed to the layout
 *
 * @return  array
 */
public function getLayoutData()
{
    // Get the basic field data
    $data = parent::getLayoutData();
    $itemId = $this->element['data-typeAlias'] . '.' . $this->form->getValue('id');
    $label = Text::_('JTOOLBAR_VERSIONS');
    $link = 'index.php?option=com_contenthistory&view=history&layout=modal&tmpl=component&field=' . $this->id . '&item_id=' . $itemId . '&' . Session::getFormToken() . '=1';
    $extraData = array('item' => $itemId, 'label' => $label, 'link' => $link);
    return array_merge($data, $extraData);
}