Back to TextareaField class

Method getLayoutData

protected array
getLayoutData
()
Method to get the data to be passed to the layout for rendering.
Returns
  • array
Since
  • 3.7
Class: TextareaField
Project: Joomla

Method getLayoutData - Source code

/**
 * Method to get the data to be passed to the layout for rendering.
 *
 * @return  array
 *
 * @since 3.7
 */
protected function getLayoutData()
{
    $data = parent::getLayoutData();
    // Initialize some field attributes.
    $columns = $this->columns ? ' cols="' . $this->columns . '"' : '';
    $rows = $this->rows ? ' rows="' . $this->rows . '"' : '';
    $maxlength = $this->maxlength ? ' maxlength="' . $this->maxlength . '"' : '';
    $extraData = array('maxlength' => $maxlength, 'rows' => $rows, 'columns' => $columns, 'charcounter' => $this->charcounter);
    return array_merge($data, $extraData);
}