Created a detailed pairing with an input

@param string $label
@param string $type
@param string $name
@param string $value
@param array $attributes
@param string|null $description
@return string
434904
protected function backup_detail_input($label, $type, $name, $value, array $attributes = array(), $description = null) {
        if (!empty($description)) {
            $description = html_writer::tag('span', $description, array('class' => 'description'));
        } else {
            $description = '';
        }
        return $this->backup_detail_pair(
            $label,
            html_writer::empty_tag('input', $attributes + array('name' => $name, 'type' => $type, 'value' => $value)) . $description
        );
    }
196574
public function input($type, $name, $label = null, $value = null, array $options = [])
    {
        $label = $this->getLabelTitle($label, $name);

        $optionsField = $this->getFieldOptions(array_except($options, ['suffix', 'prefix']), $name);

        $inputElement = '';

         if(isset($options['prefix'])) {
            $inputElement = $options['prefix'];
        }

        $inputElement .= $type === 'password' ? $this->form->password($name, $optionsField) : $this->form->{$type}($name, $value, $optionsField);

         if(isset($options['suffix'])) {
            $inputElement .= $options['suffix'];
        }

         if(isset($options['prefix']) || isset($options['suffix'])) {
            $inputElement = '<div class="input-group">' . $inputElement . '</div>';
        }

        $wrapperOptions = $this->isHorizontal() ? ['class' => $this->getRightColumnClass()] : [];
        $wrapperElement = '<div' . $this->html->attributes($wrapperOptions) . '>' . $inputElement . $this->getFieldError($name) . $this->getHelpText($name, $optionsField) . '</div>';

        return $this->getFormGroup($name, $label, $wrapperElement);
    }
1124044
public static function input($type, $name, $attributes)
    {
        // Set id attribute to be same as the name
        // if one has not been set
        if (!isset($attributes['id'])) {
            $attributes['id'] =  $name;
        }

        // Check if the value is set in the
        // attributes array
        if (isset($attributes['value'])) {
            $value = $attributes['value'];
        }
        // Check if its in the _POST array
        elseif (isset($_POST[$name])) {
            $value = $_POST[$name];
        }
        // It's nowhere...
        else {
            $value = '';
        }

        // Add selected or checked attribute?
        foreach (array('selected', 'checked') as $attr) {
            if (isset($attributes[$attr]) and !$attributes[$attr]) {
                unset($attributes[$attr]);
            } elseif (isset($attributes[$attr])) {
                $attributes[$attr] = $attr;
            }
        }

        // Merge default attributes with
        // the specified attributes.
        $attributes = array_merge(array('type' => $type, 'name' => $name), $attributes);

        // Textareas
        if ($type == 'textarea') {
            return "<textarea " . HTML::buildAttributes($attributes) . ">{$value}</textarea>";
        }
        // Everything else
        else {
            // Don't pass the checked attribute if its false.
            if (isset($attributes['checked']) and !$attributes['checked']) {
                unset($attributes['checked']);
            }
            return "<input " . HTML::buildAttributes($attributes) . ">";
        }
    }
658105
protected final function add_score($name, $label=null, $value=null) {
        if ($label === null) {
            $label = get_string("score", "lesson");
        }

        if (is_int($name)) {
            $name = "score[$name]";
        }
        $this->_form->addElement('text', $name, $label, array('size'=>5));
        $this->_form->setType($name, PARAM_INT);
        if ($value !== null) {
            $this->_form->setDefault($name, $value);
        }
        $this->_form->addHelpButton($name, 'score', 'lesson');

        // Score is only used for custom scoring. Disable the element when not in use to stop some confusion.
        if (!$this->_customdata['lesson']->custom) {
            $this->_form->freeze($name);
        }
    }
847025
public function input($type, $name, $value = null, array $attributes = [])
    {
        $tag = new Tag('input', $attributes);
        $tag->type = $type;
        $tag->name = $name;
        $tag->value = $value;
        return $tag;
    }
1218730
public function button($value, $name = null, $attributes = array())
    {
        $name = pick($name, $value);

        return $this->tag('button', $value)
                    ->set(array('id' => $name, 'name' => $name))
                    ->set($attributes);
    }
1355552
public static function getIdAttribute($name, $attributes)
    {
        if (array_has($attributes, 'id')) {
            return $attributes['id'];
        }

        if (!is_null(self::$labels)) {
            if (in_array($name, self::$labels)) {
                return $name;
            }
        }
    }
3988
public static function input(string $name, string $value = '', array $attributes = null) : string
    {
        // Set the input name
        $attributes['name'] = $name;

        // Set the input id
        $attributes['id'] = (isset($attributes['id'])) ? $attributes['id'] : $name;

        // Set the input value
        $attributes['value'] = $value;

        if ( ! isset($attributes['type'])) {

            // Default type is text
            $attributes['type'] = 'text';
        }

        return '<input'.Html::attributes($attributes).'>';
    }
274503
public function normalizeFormFieldTagParams($name, $value, array $attributes, $fieldType = null)
    {
        if (!isset($attributes['id'])) {
            $attributes['id'] = trim(
                str_replace(['[', ']', '()', '__'], ['_', '_', '', '_'], $name),
                '_'
            );
        }
        if ($name) {
            $attributes['name'] = $name;
        }
        return [$name, (string)$value, $attributes];
    }
211328
public static function label(
        string $label, 
        string $for, 
        array $attributes = []
    ) : string
    {
        $preAttributesLabel = [
            "for" => $for,
        ];
        $attributesLabel = array_merge($preAttributesLabel, $attributes);
        return self::tag("label", $label, $attributesLabel);
    }
575306
public function input($type = null, $name = null, $value = null)
    {
        $hasValue = $name && (! is_null($this->old($name, $value)) || ! is_null($value));

        return Input::create()
            ->attributeIf($type, 'type', $type)
            ->attributeIf($name, 'name', $this->fieldName($name))
            ->attributeIf($name, 'id', $this->fieldName($name))
            ->attributeIf($hasValue, 'value', $this->old($name, $value));
    }
134425
public function input($type, $name, $value = '', $options = [])
    {
        if (!isset($options['id'])) {
            $options['id'] = $name;
        }

        if (!empty($value)) {
            $options['value'] = $value;
        }

        $options['type'] = $type;
        $options['name'] = $name;

        return '<input'.$this->attributes($options).'>';
    }
351400
public static function link($label, $url = null, array $attributes = array())
    {
        // If the label is null, use the URL
        if ($label === null) {
            $label = $url;
        }

        // If the URL parameter is an object, call its `href()` method.
        if (is_object($url) and method_exists($url, 'href')) {
            $url = $url->href();
        }

        // Is this a local link?
        // if (substr($url, 0, 4) != 'http') {
        //     $url = Request::basePath($url);
        // }

        $attributes['href'] = $url;
        $attributes = static::buildAttributes($attributes);

        return "<a {$attributes}>{$label}</a>";
    }
848055
public function defineAttribute($name, $value = null, $label = null)
    {
        if ($label) {
            $this->_attributeLabels[$name] = $label;
        }
        parent::defineAttribute($name, $value);
    }
215019
public static function label($label, $id = null, array $attributes = array())
	{
		return static::$instance->label($label, $id, $attributes);
	}
453990
public function add($name, $label, $type, $validation = '')
    {
        if (strpos($type, "\\") !== false) {
            $field_class = $type;
        } else {
            $field_class = '\Zofe\Rapyd\DataForm\Field\\' .  ucfirst($type);
        }

        //instancing
        if (isset($this->model)) {
            $field_obj = new $field_class($name, $label, $this->model, $this->model_relations);
        } else {
            $field_obj = new $field_class($name, $label);
        }

        if (!$field_obj instanceof Field) {
            throw new \InvalidArgumentException('Third argument («type») must point to class inherited Field class');
        }

        if ($field_obj->type == "file") {
            $this->multipart = true;
        }

        //default group
        if (isset($this->default_group) && !isset($field_obj->group)) {
            $field_obj->group = $this->default_group;
        }
        $this->fields[$name] = $field_obj;

        return $field_obj;
    }
429889
public static function text($name, $value, array $attributes = array())
    {
        $node = new Node\Text();

        if (!is_null($name)) {
            $attributes['name'] = $name;
        }

        if (!is_null($value)) {
            $attributes['value'] = $value;
        }

        return $node->render($attributes);
    }