protected function getLabel()
	{
		// Initialise variables.
		$label = '';

		if ($this->hidden)
		{
			return $label;
		}

		// Get the label text from the XML element, defaulting to the element name.
		$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
		$text = $this->translateLabel ? Lang::txt($text) : $text;

		// Build the class for the label.
		$class = !empty($this->description) ? 'hasTip' : '';
		$class = $this->required == true ? $class . ' required-field' : $class;
		$class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class;

		// Add the opening label tag and main attributes attributes.
		$label .= '<label id="' . $this->id . '-lbl" for="' . $this->id . '" class="' . $class . '"';

		// If a description is specified, use it to build a tooltip.
		if (!empty($this->description))
		{
			$label .= ' title="'
				. htmlspecialchars(
				trim($text, ':') . '::' . ($this->translateDescription ? Lang::txt($this->description) : $this->description),
				ENT_COMPAT, 'UTF-8'
			) . '"';
		}

		// Add the label text and closing tag.
		if ($this->required)
		{
			$label .= '>' . $text . ' <span class="required star">' . Lang::txt('JOPTION_REQUIRED'). '</span></label>';
		}
		else
		{
			$label .= '>' . $text . '</label>';
		}

		return $label;
	}
protected function getLabel()
	{
		// Initialise variables.
		$label = '';

		if ($this->hidden)
		{
			return $label;
		}

		// Get the label text from the XML element, defaulting to the element name.
		$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
		$text = $this->translateLabel ? Lang::txt($text) : $text;

		// Build the class for the label.
		$class = !empty($this->description) ? 'hasTip' : '';
		$class = $this->required == true ? $class . ' required-field' : $class;
		$class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class;

		// Add the opening label tag and main attributes attributes.
		$label .= '<label id="' . $this->id . '-lbl" for="' . $this->id . '" class="' . $class . '"';

		// If a description is specified, use it to build a tooltip.
		if (!empty($this->description))
		{
			$label .= ' title="'
				. htmlspecialchars(
				trim($text, ':') . '::' . ($this->translateDescription ? Lang::txt($this->description) : $this->description),
				ENT_COMPAT, 'UTF-8'
			) . '"';
		}

		// Add the label text and closing tag.
		if ($this->required)
		{
			$label .= '>' . $text . ' <span class="required star">' . Lang::txt('JOPTION_REQUIRED'). '</span></label>';
		}
		else
		{
			$label .= '>' . $text . '</label>';
		}

		return $label;
	}
protected function getLabel ( ) { // Initialise variables. $ label = '' ; if ( $ this -> hidden ) { return $ label ; } // Get the label text from the XML element, defaulting to the element name. $ text = $ this -> element [ 'label' ] ? ( string ) $ this -> element [ 'label' ] : ( string ) $ this -> element [ 'name' ] ; $ text = $ this -> translateLabel ? Lang :: txt ( $ text ) : $ text ; // Build the class for the label. $ class = ! empty ( $ this -> description ) ? 'hasTip' : '' ; $ class = $ this -> required == true ? $ class . ' required-field' : $ class ; $ class = ! empty ( $ this -> labelClass ) ? $ class . ' ' . $ this -> labelClass : $ class ; // Add the opening label tag and main attributes attributes. $ label .= '<label id="' . $ this -> id . '-lbl" for="' . $ this -> id . '" class="' . $ class . '"' ; // If a description is specified, use it to build a tooltip. if ( ! empty ( $ this -> description ) ) { $ label .= ' title="' . htmlspecialchars ( trim ( $ text , ':' ) . '::' . ( $ this -> translateDescription ? Lang :: txt ( $ this -> description ) : $ this -> description ) , ENT_COMPAT , 'UTF-8' ) . '"' ; } // Add the label text and closing tag. if ( $ this -> required ) { $ label .= '>' . $ text . ' <span class="required star">' . Lang :: txt ( 'JOPTION_REQUIRED' ) . '</span></label>' ; } else { $ label .= '>' . $ text . '</label>' ; } return $ label ; }
Method to get the field label markup.

@return  string  The field label markup.
Method to get the field label markup .