Returns the hint text for the input.
@return string the hint text
346910
protected function getHint()
	{
		if (isset($this->hintText))
		{
			$htmlOptions = $this->hintOptions;

			if (isset($htmlOptions['class']))
				$htmlOptions['class'] .= ' help-block';
			else
				$htmlOptions['class'] = 'help-block';

			return CHtml::tag('p', $htmlOptions, $this->hintText);
		} else
			return '';
	}
770770
protected function getNameInput()
    {
        $name = trim($this->argument('name'));

        $this->type = $this->qualifyClass($name);

        return $name;
    }
153013
public function getMissingText()
    {
        $missing = $this->missing ?: $this->dataFilter->getMissingTemplate();
        return U::formatString($missing, array(
            'attrib' => $this->name
        ));
    }
1275392
public function getMarkedInput()
    {
        // create line matrix
        $matrix = preg_split ('/$\R?^/m', $this->input);

        $part = '';

        if(isset($matrix[$this->soqlLineNo]))
        {
            $part = $matrix[$this->soqlLineNo];

            $part .= "\n" . str_repeat('-', $this->getSoqlLinePos()) . "^";
        }
        return $part;
    }
356645
public function getText()
    {
        if (!$this->text) {
            $this->text = '';
            for ($i = 0; $i < $this->macLength; $i++) {
                $this->text .= strtolower($this->macChars{rand(0, strlen($this->macChars) - 1)});
            }
        }

        return $this->text;
    }
127410
public function getTextOutput()
    {
        $patchLevel = $this->getPatchLevel();

        $commands     = array(sprintf('-- Patch level %d structural changes', $patchLevel));
        $lastLocation = '';
        $lastName     = '';
        $noOutput     = true;
        foreach ($this->getStructuralPatches($patchLevel) as $patch) {
            if ($patch['gpa_location'] != $lastLocation) {
                $commands[] = sprintf("\n-- DATABASE LOCATION: %s", $patch['gpa_location']);
                $lastLocation = $patch['gpa_location'];
            }
            if ($patch['gpa_name'] != $lastName) {
                $commands[] = sprintf("\n-- PATCH: %s", $patch['gpa_name']);
                $lastName = $patch['gpa_name'];
            }
            $commands[] = $patch['gpa_sql'] . ';';
            $noOutput = false;
        }

        if ($noOutput) {
            $commands[] = sprintf("\n-- No structural changes in patchlevel %d", $patchLevel);
        }
        $commands[] = '';

        return implode("\n", $commands);
    }
827693
protected function getInput()
	{
		if ($this->element['extension'])
		{
			$extension = (string) $this->element['extension'];
		}
		else
		{
			$extension = (string) JFactory::getApplication()->input->get('extension', 'com_content');
		}

		$allowEdit  = ((string) $this->element['edit'] == 'true') ? true : false;
		$allowClear = ((string) $this->element['clear'] != 'false') ? true : false;

		// Load language
		JFactory::getLanguage()->load('com_categories', JPATH_ADMINISTRATOR);

		// The active category id field.
		$value = (int) $this->value > 0 ? (int) $this->value : '';

		// Build the script.
		$script = array();

		// Select button script
		$script[] = '	function jSelectCategory_' . $this->id . '(id, title, object) {';
		$script[] = '		document.getElementById("' . $this->id . '_id").value = id;';
		$script[] = '		document.getElementById("' . $this->id . '_name").value = title;';

		if ($allowEdit)
		{
			$script[] = '		if (id == "' . (int) $this->value . '") {';
			$script[] = '			jQuery("#' . $this->id . '_edit").removeClass("hidden");';
			$script[] = '		} else {';
			$script[] = '			jQuery("#' . $this->id . '_edit").addClass("hidden");';
			$script[] = '		}';
		}

		if ($allowClear)
		{
			$script[] = '		jQuery("#' . $this->id . '_clear").removeClass("hidden");';
		}

		$script[] = '		jQuery("#categorySelect' . $this->id . 'Modal").modal("hide");';
		$script[] = '	}';

		// Edit button script
		$script[] = '	function jEditCategory_' . $value . '(title) {';
		$script[] = '		document.getElementById("' . $this->id . '_name").value = title;';
		$script[] = '	}';

		// Clear button script
		static $scriptClear;

		if ($allowClear && !$scriptClear)
		{
			$scriptClear = true;

			$script[] = '	function jClearCategory(id) {';
			$script[] = '		document.getElementById(id + "_id").value = "";';
			$script[] = '		document.getElementById(id + "_name").value = "'
				. htmlspecialchars(JText::_('COM_CATEGORIES_SELECT_A_CATEGORY', true), ENT_COMPAT, 'UTF-8') . '";';
			$script[] = '		jQuery("#"+id + "_clear").addClass("hidden");';
			$script[] = '		if (document.getElementById(id + "_edit")) {';
			$script[] = '			jQuery("#"+id + "_edit").addClass("hidden");';
			$script[] = '		}';
			$script[] = '		return false;';
			$script[] = '	}';
		}

		// Add the script to the document head.
		JFactory::getDocument()->addScriptDeclaration(implode("\n", $script));

		// Setup variables for display.
		$html = array();

		$linkCategories = 'index.php?option=com_categories&amp;view=categories&amp;layout=modal&amp;tmpl=component'
			. '&amp;extension=' . $extension
			. '&amp;function=jSelectCategory_' . $this->id;

		$linkCategory   = 'index.php?option=com_categories&amp;view=category&amp;layout=modal&amp;tmpl=component'
			. '&amp;task=category.edit'
			. '&amp;function=jEditCategory_' . $value;

		if (isset($this->element['language']))
		{
			$linkCategories .= '&amp;forcedLanguage=' . $this->element['language'];
			$linkCategory   .= '&amp;forcedLanguage=' . $this->element['language'];
			$modalTitle = JText::_('COM_CATEGORIES_CHANGE_CATEGORY') . ' &#8212; ' . $this->element['label'];
		}
		else
		{
			$modalTitle = JText::_('COM_CATEGORIES_CHANGE_CATEGORY');
		}

		$urlSelect = $linkCategories . '&amp;' . JSession::getFormToken() . '=1';
		$urlEdit   = $linkCategory . '&amp;id=' . $value . '&amp;' . JSession::getFormToken() . '=1';

		if ($value)
		{
			$db    = JFactory::getDbo();
			$query = $db->getQuery(true)
				->select($db->quoteName('title'))
				->from($db->quoteName('#__categories'))
				->where($db->quoteName('id') . ' = ' . (int) $value);
			$db->setQuery($query);

			try
			{
				$title = $db->loadResult();
			}
			catch (RuntimeException $e)
			{
				JError::raiseWarning(500, $e->getMessage());
			}
		}

		if (empty($title))
		{
			$title = JText::_('COM_CATEGORIES_SELECT_A_CATEGORY', true);
		}

		$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8');

		// The current category display field.
		$html[] = '<span class="input-append">';
		$html[] = '<input class="input-medium" id="' . $this->id . '_name" type="text" value="' . $title . '" disabled="disabled" size="35" />';

		// Select category button
		$html[] = '<a'
			. ' class="btn hasTooltip"'
			. ' data-toggle="modal"'
			. ' role="button"'
			. ' href="#categorySelect' . $this->id . 'Modal"'
			. ' title="' . JHtml::tooltipText('COM_CATEGORIES_CHANGE_CATEGORY') . '">'
			. '<span class="icon-file"></span> ' . JText::_('JSELECT')
			. '</a>';

		// Edit category button
		if ($allowEdit)
		{
			$html[] = '<a'
				. ' class="btn hasTooltip' . ($value ? '' : ' hidden') . '"'
				. ' id="' . $this->id . '_edit"'
				. ' data-toggle="modal"'
				. ' role="button"'
				. ' href="#categoryEdit' . $value . 'Modal"'
				. ' title="' . JHtml::tooltipText('COM_CATEGORIES_EDIT_CATEGORY') . '">'
				. '<span class="icon-edit"></span> ' . JText::_('JACTION_EDIT')
				. '</a>';
		}

		// Clear category button
		if ($allowClear)
		{
			$html[] = '<button'
				. ' class="btn' . ($value ? '' : ' hidden') . '"'
				. ' id="' . $this->id . '_clear"'
				. ' onclick="return jClearCategory(\'' . $this->id . '\')">'
				. '<span class="icon-remove"></span>' . JText::_('JCLEAR')
				. '</button>';
		}

		$html[] = '</span>';

		// Select category modal
		$html[] = JHtml::_(
			'bootstrap.renderModal',
			'categorySelect' . $this->id . 'Modal',
			array(
				'title'       => $modalTitle,
				'url'         => $urlSelect,
				'height'      => '400px',
				'width'       => '800px',
				'bodyHeight'  => '70',
				'modalWidth'  => '80',
				'footer'      => '<a type="button" class="btn" data-dismiss="modal" aria-hidden="true">'
						. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>',
			)
		);

		// Edit category modal
		$html[] = JHtml::_(
			'bootstrap.renderModal',
			'categoryEdit' . $value . 'Modal',
			array(
				'title'       => JText::_('COM_CATEGORIES_EDIT_CATEGORY'),
				'backdrop'    => 'static',
				'keyboard'    => false,
				'closeButton' => false,
				'url'         => $urlEdit,
				'height'      => '400px',
				'width'       => '800px',
				'bodyHeight'  => '70',
				'modalWidth'  => '80',
				'footer'      => '<a type="button" class="btn" data-dismiss="modal" aria-hidden="true"'
						. ' onclick="jQuery(\'#categoryEdit' . $value . 'Modal iframe\').contents().find(\'#closeBtn\').click();">'
						. JText::_("JLIB_HTML_BEHAVIOR_CLOSE") . '</a>'
						. '<button type="button" class="btn btn-primary" aria-hidden="true"'
						. ' onclick="jQuery(\'#categoryEdit' . $value . 'Modal iframe\').contents().find(\'#saveBtn\').click();">'
						. JText::_("JSAVE") . '</button>'
						. '<button type="button" class="btn btn-success" aria-hidden="true"'
						. ' onclick="jQuery(\'#categoryEdit' . $value . 'Modal iframe\').contents().find(\'#applyBtn\').click();">'
						. JText::_("JAPPLY") . '</button>',
			)
		);

		// Note: class='required' for client side validation
		$class = $this->required ? ' class="required modal-value"' : '';

		$html[] = '<input type="hidden" id="' . $this->id . '_id"' . $class . ' name="' . $this->name . '" value="' . $value . '" />';

		return implode("\n", $html);
	}
345837
protected function getInput() {

        $js = "";

        $locale   = $this->element['locale'] ? (string) $this->element['locale'] : (new LanguageFactory())->getLanguage()->get('iso');
        $format   = $this->element['format'] ? (string) $this->element['format'] : 'L';
        $valueFormat = $this->element['valueFormat'] ? (string) $this->element['valueFormat'] : 'YYYY-MM-DD HH:mm:ss';
        $minDate  = $this->element['minDate'] ? (string) $this->element['minDate'] : null;
        $maxDate  = $this->element['maxDate'] ? (string) $this->element['maxDate'] : null;
        $placeholder  = $this->element['placeholder'] ? ' placeholder="' . htmlspecialchars((string) $this->element['placeholder']) . '"' : null;
        $class    = $this->element['class'] ? ' ' . (string) $this->element['class'] : '';
        $dayOnly  = $this->element['dayOnly'] ? ((string) $this->element['dayOnly'] == "true") : false;
        $readonly = ((string) $this->element['readonly'] == 'true') ? ' readonly="readonly"' : '';
        $disabled = ((string) $this->element['disabled'] == 'true') ? ' disabled="disabled"' : '';

        $options = array(
            'locale'  => $locale,
            'format'  => $format,
            'icons' => array(
                'time' => 'fa fa-clock-o',
                'date' => 'fa fa-calendar',
                'up' => 'fa fa-chevron-up',
                'down' => 'fa fa-chevron-down',
                'previous' => 'fa fa-chevron-left',
                'next' => 'fa fa-chevron-right',
                'today' => 'fa fa-dot-circle-o',
                'clear' => 'fa fa-trash',
                'close' => 'fa fa-times'
            )
        );

	    if ($this->element['showClose']) {
		    $options['showClose'] = ($this->element['showClose'] == "true");
	    }

	    if ($this->element['showClear']) {
		    $options['showClear'] = ($this->element['showClear'] == "true");
	    }

	    if ($this->element['showTodayButton']) {
		    $options['showTodayButton'] = ($this->element['showTodayButton'] == "true");
	    }

	    if ($this->element['calendarWeeks']) {
		    $options['calendarWeeks'] = ($this->element['calendarWeeks'] == "true");
	    }

	    if ($this->element['useCurrent']) {
		    $options['useCurrent'] = ($this->element['useCurrent'] == "true");
	    }

	    if ($this->element['collapse']) {
		    $options['collapse'] = ($this->element['collapse'] == "true");
	    }

	    if ($this->element['collapse']) {
		    $options['collapse'] = ($this->element['collapse'] == "true");
	    }

	    if (isset($this->element['stepping'])) {
		    $options["stepping"] = (string) $this->element['stepping'];
	    }

	    if (isset($this->element['viewMode'])) {
		    $options["viewMode"] = (string) $this->element['viewMode'];
	    }

	    if (isset($this->element['toolbarPlacement'])) {
		    $options["toolbarPlacement"] = (string) $this->element['toolbarPlacement'];
	    }

        if (isset($this->element['default'])) {
            $options["defaultDate"] = (string) $this->element['default'];
        }

        if (isset($this->element['widgetParent'])) {
            $options["widgetParent"] = (string) $this->element['widgetParent'];
        }

        if (isset($this->element['disabledDates'])) {
	    	if (is_array($this->element['disabledDates'])) {
			    $options["disabledDates"] = (array) $this->element['disabledDates'];
		    } else {
			    $options["disabledDates"] = explode(",", (string) $this->element['disabledDates']);
		    }
        }

	    if (isset($this->element['enabledDates'])) {
		    if (is_array($this->element['enabledDates'])) {
			    $options["enabledDates"] = (array) $this->element['enabledDates'];
		    } else {
			    $options["enabledDates"] = explode(",", (string) $this->element['enabledDates']);
		    }
	    }

	    if (isset($this->element['daysOfWeekDisabled'])) {
		    if (is_array($this->element['daysOfWeekDisabled'])) {
			    $options["daysOfWeekDisabled"] = (array) $this->element['daysOfWeekDisabled'];
		    } else {
			    $options["daysOfWeekDisabled"] = explode(",", (string) $this->element['daysOfWeekDisabled']);
		    }
	    }

        if (isset($this->element['sideBySide'])) {
            $options["sideBySide"] = ((string) $this->element['sideBySide'] == "true");
        }

        if (isset($this->element['useStrict'])) {
            $options["useStrict"] = ((string) $this->element['useStrict'] == "true");
        }

        if (isset($this->element['keepOpen'])) {
            $options["keepOpen"] = ((string) $this->element['keepOpen'] == "true");
        }

        if (isset($this->element['inline'])) {
            $options["inline"] = ((string) $this->element['inline'] == "true");
        }

        if (isset($this->element['keepInvalid'])) {
            $options["keepInvalid"] = ((string) $this->element['keepInvalid'] == "true");
        }

        if (isset($this->element['debug'])) {
            $options["debug"] = ((string) $this->element['debug'] == "true");
        }

        if (isset($this->element['ignoreReadonly'])) {
            $options["ignoreReadonly"] = ((string) $this->element['ignoreReadonly'] == "true");
        }

        if (isset($this->element['allowInputToggle'])) {
            $options["allowInputToggle"] = ((string) $this->element['allowInputToggle'] == "true");
        }

        if (isset($this->element['focusOnShow'])) {
            $options["focusOnShow"] = ((string) $this->element['focusOnShow'] == "true");
        }

        if (isset($minDate)) {
            if (strpos($minDate, 'field:') !== false) {

                $fieldName = substr($minDate, 6);
                $field     = $this->form->getField($fieldName);

                if ($field !== false) {

                    $js .= "$('#" . $field->id . "_picker').on('dp.change', function(e) {
    if (e.oldDate) {
        $('#" . $this->id . "_picker').data('DateTimePicker').minDate(e.date);
    }
});\n";

                }

            } else {
                $options['minDate'] = $minDate;
            }
        }

        if (isset($maxDate)) {
            if (strpos($maxDate, 'field:') !== false) {

                $fieldName = substr($maxDate, 6);
                $field     = $this->form->getField($fieldName);

                if ($field !== false) {

                    $js .= "$('#" . $field->id . "_picker').on('dp.change', function(e) {
    if (e.oldDate) {
        $('#" . $this->id . "_picker').data('DateTimePicker').maxDate(e.date);
    }
});\n";

                }

            } else {
                $options['maxDate'] = $maxDate;
            }
        }

        // Si on a une valeur.
        if (!empty($this->value) && $this->value != $this->form->getDb()->getNullDate() && $this->value != '0000-00-00') {

            // La date venant du système est en UTC.
            // On la formate avec le fuseau horaire de l'utilisateur.
            $value = (new DateUtility($this->form->getApplication()->get('timezone')))->format($this->value, 'APP_GLOBAL_DATE_ISO');
            $options['defaultDate'] = $value;

        }

        $js .= "$('#" . $this->id . "_picker').datetimepicker(" . json_encode($options) .").on('dp.change', function(e) {
    if (e.date) $('#" . $this->id . "').val(e.date";

        if ($dayOnly) {
            $js .= ".startOf('day')";
        } else {
            $js .= ".utc()";
        }

    $js .= ".format('" . $valueFormat . "'))
    else $('#" . $this->id . "').val('');
    $('#" . $this->id . "').trigger('change');
});
$('#" . $this->id . "_btn').on('click', function() {
    $('#" . $this->id . "_picker').data('DateTimePicker').show();
});";

        (new RequireJSUtility())
            ->addRequireJSModule("moment", "js/vendor/moment.min", true, array("jquery"))
            ->addRequireJSModule("bsdatetimepicker", "js/vendor/bootstrap-datetimepicker.min", true, array("jquery", "bootstrap", "moment"))
            ->addDomReadyJS($js, false, "bsdatetimepicker, css!/css/vendor/bootstrap-datetimepicker.min.css");

        $html = array();

        $html[] = '<div class="input-group date' . $class . '">';
        $html[] = '<input type="text" id="' . $this->id . '_picker" class="form-control"' . $readonly . $placeholder . $disabled . '>';
        $html[] = '<span class="input-group-addon" id="' . $this->id . '_btn">';
        $html[] = '<span class="fa fa-calendar"></span>';
        $html[] = '</span>';
        $html[] = '</div>';
        $html[] = '<input type="hidden" id="' . $this->id . '" name="' . $this->name . '" value="' . htmlspecialchars($this->value) . '">';

        return implode($html);

    }
291340
protected function getInput()
	{
		$html = array();
		$attr = '';

		$select = new HtmlSelect;

		// Try to inject the text object into the field
		try
		{
			$select->setText($this->getText());
		}
		catch (\RuntimeException $exception)
		{
			// A Text object was not set, ignore the error and try to continue processing
		}

		// Initialize some field attributes.
		$attr .= $this->element['class'] ? ' class="' . (string) $this->element['class'] . '"' : '';

		// To avoid user's confusion, readonly="true" should imply disabled="true".
		if ((string) $this->element['readonly'] == 'true' || (string) $this->element['disabled'] == 'true')
		{
			$attr .= ' disabled="disabled"';
		}

		$attr .= $this->element['size'] ? ' size="' . (int) $this->element['size'] . '"' : '';
		$attr .= $this->multiple ? ' multiple="multiple"' : '';

		// Initialize JavaScript field attributes.
		$attr .= $this->element['onchange'] ? ' onchange="' . (string) $this->element['onchange'] . '"' : '';

		// Get the field options.
		$options = (array) $this->getOptions();

		// Create a read-only list (no name) with a hidden input to store the value.
		if ((string) $this->element['readonly'] == 'true')
		{
			$html[] = $select->genericlist($options, '', trim($attr), 'value', 'text', $this->value, $this->id);
			$html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
		}
		else
		// Create a regular list.
		{
			$html[] = $select->genericlist($options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
		}

		return implode($html);
	}
1074565
protected function promptFormatted()
    {
        $prompt = $this->prompt . ' ';

        if ($this->show_acceptable) {
            $prompt .= $this->acceptableFormatted() . ' ';
        }

        return $prompt;
    }
412638
public function getHtml(): string
  {
    $this->attributes['name'] = $this->submitName;

    $html = $this->prefix;
    $html .= $this->getHtmlPrefixLabel();
    $html .= Html::generateElement('textarea', $this->attributes, Cast::toOptString($this->value));
    $html .= $this->getHtmlPostfixLabel();
    $html .= $this->postfix;

    return $html;
  }
1016354
protected function matchText()
    {
        return ReplyRuleKeyword::find()
            ->keyword($this->message['Content'])
            ->wechatRule($this->getWechat()->id)
            ->limitTime(TIMESTAMP)
            ->all();
    }
84051
public function getTitleText()
    {
        if ($this->UseLevelTitle && ($level = $this->getLevel())) {
            return $level->MenuTitle;
        }
        
        return parent::getTitleText();
    }
596184
public function getErrorText()
    {
        $message = '';
        if ($this->isError()) {
            $message = $this->messages->message[0]->text;
            if (@$this->transactionResponse->errors[0]->errorText) {
                $message = $this->transactionResponse->errors[0]->errorText;
            }
        }
        return $message;
    }
172003
public function getInputName()
  {
    $n = false;
    if ($f = $this->getForm()) {
      $n = $f->getName();
    }

    $inp = $this->getField();

    return $n ? $n . '[' . $inp . ']' : $inp;
  }
58335
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;
	}
655935
protected function getInput()
	{
		// Initialize variables.
		$attributes = array(
			'type'         => 'text',
			'value'        => htmlspecialchars($this->value, ENT_COMPAT, 'UTF-8'),
			'name'         => $this->name,
			'id'           => $this->id,
			'size'         => ($this->element['size']      ? (int) $this->element['size']      : ''),
			'maxlength'    => ($this->element['maxlength'] ? (int) $this->element['maxlength'] : ''),
			'class'        => ($this->element['class']     ? (string) $this->element['class']  : ''),
			'readonly'     => ((string) $this->element['readonly'] == 'true'    ? 'readonly' : ''),
			'disabled'     => ((string) $this->element['disabled'] == 'true'    ? 'disabled' : '')
		);

		Behavior::framework(true);

		$results = App::get('dispatcher')->trigger(
			'hubzero.onGetMultiEntry',
			array(
				array('tags', $this->name, $this->id, $attributes['class'], $this->value, null, null, 'multi', ($attributes['disabled'] ? true : null))
			)
		);

		if (count($results) > 0)
		{
			$results = implode("\n", $results);
		}
		else
		{
			$results = self::getInput();
		}

		return $results;
	}