Creates text input element

@param string $name Element name
@param string $value Element value
@param array $attributes Extra attributes
@return string
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);
    }
1226093
public static function textarea(string $name = '', $value = '', array $attributes = []): string
    {
        $defaultAttributes = ['method-get' => false, 'cols' => 20, 'rows' => 40, 'class' => 'form-textarea'];
        $userAttributes = \array_merge($defaultAttributes, $attributes);
        $attributes = [];
        $attributes['name'] = $userAttributes['method-get'] === false ? \sprintf('MFVARS[%s]', $name) : $name;
        $attributes['id'] = isset($userAttributes['id']) ? $userAttributes['id'] : $name;
        $userAttributes = static::clearAttributes($userAttributes, ['method-get', 'id']);

        return Tags::textarea($value, \array_merge($attributes, $userAttributes));
    }
583462
public function input($type, $name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build($type, $name, $value, $attributes, $extra);
    }
636626
public function submit($name = null, $value = null, $attr = null)
    {
        return $this->createInput('submit', $name, $value, $attr);
    }
485375
public static function text($name, $value = '', array $htmlOptions = [])
    {
    	return self::input('text', $name, $value) . self::htmlOptions($htmlOptions) .'>';
    }
453743
public static function date($name, $value, array $attributes = array())
    {
        $node = new Node\Date();

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

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

        return $node->render($attributes);
    }
636820
public static function input($field, $value = null, array $attributes = array())
	{
		return static::$instance->input($field, $value, $attributes);
	}
542175
public function addTextarea($name, $attributes = array()) {
	
		$control = new FormControlTextarea($name, $attributes);
		$this->addControl($control);
	
		return $control;
	
	}
169915
public function text($name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build('text', $name, $value, $attributes, $extra);
    }
267467
public static function meta($name = 'name', $value, $content, array $attributes = [])
    {
        $attributes = array_merge([
            $name => $value,
            'content' => $content
        ], $attributes);

        return self::tag('meta', $attributes);
    }
359624
public function number($name, $value = null, array $attributes = [])
    {
        $value = $this->getDefaultValue($name, $value);
        return $this->input('number', $name, $value, $attributes);
    }
277789
public static function option($value, $text, array $attributes = array())
    {
        if (!is_null($value)) {
            $attributes['value'] = $value;
        }

        $node = new Node\Option($text);
        return $node->render($attributes);
    }
667803
public function setAttribute(string $name, string $value) : Element
    {
        $this->getTag()->setAttribute($name, $value);

        return $this;
    }
1038986
public static function input($type, $name, $value = null, array $attributes = array())
    {
        if ($type === 'textarea') {
            $input = '<textarea{{attr}}>';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '</textarea>';
        } elseif (preg_match('#^(' . self::$alloweds . ')$#', $type)) {
            $input = '<input type="' . $type . '" value="';

            if ($value !== null) {
                $input .= self::entities($value);
            }

            $input .= '"{{attr}}' . self::$useXhtml . '>';
        } else {
            throw new Exception('Invalid type');
        }

        return self::setAttr($attributes, $input, $name, $type);
    }
706209
public function hidden($name, $value = null, array $attributes = [])
    {
        $value = $this->getDefaultValue($name, $value);
        return $this->input('hidden', $name, $value, $attributes);
    }
25958
public function input(String $type = NULL, String $name = NULL, String $value = NULL, Array $attributes = []) : String
    {
        if( isset($this->settings['attr']['type']) )
        {
            $type = $this->settings['attr']['type'];

            unset($this->settings['attr']['type']);
        }

        $this->settings['attr'] = [];

        return $this->_input($name, $value, $attributes, $type);
    }
1252839
public static function time($name, $value, array $attributes = array())
    {
        $node = new Node\Time();

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

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

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