FOF30\Form\Field\Ordering::getInput PHP Метод

getInput() защищенный Метод

Method to get the field input markup for this field type.
С версии: 2.0
protected getInput ( ) : string
Результат string The field input markup.
    protected function getInput()
    {
        $html = array();
        $attr = '';
        // Initialize some field attributes.
        $attr .= !empty($this->class) ? ' class="' . $this->class . '"' : '';
        $attr .= $this->disabled ? ' disabled' : '';
        $attr .= !empty($this->size) ? ' size="' . $this->size . '"' : '';
        // Initialize JavaScript field attributes.
        $attr .= !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : '';
        $this->item = $this->form->getModel();
        $keyfield = $this->item->getKeyName();
        $itemId = $this->item->{$keyfield};
        $query = $this->getQuery();
        // Create a read-only list (no name) with a hidden input to store the value.
        if ($this->readonly) {
            $html[] = JHtml::_('list.ordering', '', $query, trim($attr), $this->value, $itemId ? 0 : 1);
            $html[] = '<input type="hidden" name="' . $this->name . '" value="' . $this->value . '"/>';
        } else {
            // Create a regular list.
            $html[] = JHtml::_('list.ordering', $this->name, $query, trim($attr), $this->value, $itemId ? 0 : 1);
        }
        return implode($html);
    }