Back to FormField class

Method getTitle

protected string
getTitle
()
Method to get the field title.
Returns
  • string The field title.
Since
  • 1.7.0
Class: FormField
Project: Joomla

Method getTitle - Source code

/**
 * Method to get the field title.
 *
 * @return  string  The field title.
 *
 * @since   1.7.0
 */
protected function getTitle()
{
    $title = '';
    if ($this->hidden) {
        return $title;
    }
    // Get the label text from the XML element, defaulting to the element name.
    $title = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
    $title = $this->translateLabel ? Text::_($title) : $title;
    return $title;
}