- md5
- 47c7dec1a0551f4d6ac2add8042fae8c
- sha1
- d644ba316d61d33d599e5842aca147fa6163c412
- sha256
- 7beb6012a82f713404d77ddba571839d430e8aac5a9f6a34c8cbac88c381e066
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
<?php
/**
* Joomla! Content Management System
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\CMS\Form\Field;
defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Form\FormField;
/**
* Form Field class for the Joomla Platform.
* Supports a one line text field.
*
* @link http://www.w3.org/TR/html-markup/input.text.html#input.text
* @since 11.1
*/
class NoteField extends FormField
{
/**
* The form field type.
*
* @var string
* @since 11.1
*/
protected $type = 'Note';
/**
* Method to get the field label markup.
*
* @return string The field label markup.
*
* @since 11.1
*/
protected function getLabel()
{
if (empty($this->element['label']) && empty($this->element['description']))
{
return '';
}
$title = $this->element['label'] ? (string) $this->element['label'] : ($this->element['title'] ? (string) $this->element['title'] : '');
$heading = $this->element['heading'] ? (string) $this->element['heading'] : 'h4';
$description = (string) $this->element['description'];
$class = !empty($this->class) ? ' class="' . $this->class . '"' : '';
$close = (string) $this->element['close'];
$html = array();
if ($close)
{
$close = $close == 'true' ? 'alert' : $close;
$html[] = '<button type="button" class="close" data-dismiss="' . $close . '">×</button>';
}
$html[] = !empty($title) ? '<' . $heading . '>' . \JText::_($title) . '</' . $heading . '>' : '';
$html[] = !empty($description) ? \JText::_($description) : '';
return '</div><div ' . $class . '>' . implode('', $html);
}
/**
* Method to get the field input markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
return '';
}
}
No other release has this exact content. See every version of this file.