/**
* Method to get the field input for a tag field.
*
* @return string The field input.
*
* @since 3.1
*/
protected function getInput()
{
$data = $this->getLayoutData();
if (!\is_array($this->value) && !empty($this->value)) {
if ($this->value instanceof TagsHelper) {
if (empty($this->value->tags)) {
$this->value = array();
} else {
$this->value = $this->value->tags;
}
}
// String in format 2,5,4
if (\is_string($this->value)) {
$this->value = explode(',', $this->value);
}
// Integer is given
if (\is_int($this->value)) {
$this->value = array($this->value);
}
$data['value'] = $this->value;
}
$data['remoteSearch'] = $this->isRemoteSearch();
$data['options'] = $this->getOptions();
$data['isNested'] = $this->isNested();
$data['allowCustom'] = $this->allowCustom();
$data['minTermLength'] = (int) $this->comParams->get('min_term_length', 3);
return $this->getRenderer($this->layout)->render($data);
}