Create a URL input field.

@param  string $name
@param  string $value
@param  array  $attributes
@param  array  $extra

@return string
320437
public function url($name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build('url', $name, $value, $attributes, $extra);
    }
876867
public static function input(
        string $name, 
        string $type = "text", 
        string $value = null, 
        array $attributes = []
    ) : string 
    {
        $preAttributesInput = [
            "name" => $name,
            "type" => $type,
        ];
        if (!is_null($value)) {
            $preAttributesInput["value"] = $value;
        }
        $attributesInput = array_merge($preAttributesInput, $attributes);
        return self::tag("input", "", $attributesInput);
    }
991297
public static function submit($name, $value, array $attributes = null)
    {
        // Set the input type
        $attributes['type'] = 'submit';

        return Form::input($name, $value, $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];
    }
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) . ">";
        }
    }
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);
    }
403631
protected function doBuild($type, $name, $value = null, array $attributes = array(), array $extra = array(), $options = null)
    {
        $attributes = $this->replaceAttributes($attributes);

        if (!$this->checkAccess($attributes)) {
            return '';
        }

        $required = $this->getRequired($attributes);
        $label = $this->getLabel($name, $attributes);
        $htmlName = $this->getHtmlName($name);
        $id = $this->getHtmlId($name, $attributes);
        $errors = $this->getControlErrors($name);
        $hasErrors = !empty($errors);
        $customTemplate = $this->getCustomTemplate($attributes);

        $attributes = $this->getHtmlAttributes($type, $attributes, $errors, $id);

        $input = $this->buildControl($type, $name, $value, $attributes, $options, $htmlName, $hasErrors);

        return $this->theme->render(
            $customTemplate,
            array_merge($extra, compact('htmlName', 'id',  'label', 'input', 'errors', 'hasErrors', 'required')),
            'fields.'.$this->getDefaultTemplate($type)
        );
    }
445802
public function input($name, $value = null, $attributes = null)
    {
        return '<input type="text" name="'.$name.'" value="'.$this->getValue($name, $value).'" '.(($attributes !== null) ? $this->attributes($attributes) : "").'/>';
    }
856955
public static function link($name, $url, array $attributes = [])
    {
        return static::openTag('link', array_merge($attributes, ['href' => $url])).
            $name.
            static::closeTag('link');
    }
74753
private function makeAttribute($name, $value)
    {
        $attribute = Attribute::make($name, $value);

        $this->put($attribute->getName(), $attribute);

        return $this;
    }
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).'>';
    }
229937
public static function createBySelector($selector, $value = null, array $attributes = [])
    {
        return Document::create()->createElementBySelector($selector, $value, $attributes);
    }
538224
static public function url($name, $value=null, $settings=[])
    {
        $settings['media_type'] = 'url';
        $settings['with_input'] = isset($settings['with_input']) ? $settings['with_input'] : 'text';
        return static::select($name, $value, $settings);
    }
1200734
public static function tag( $name, $attributes = array(), $value = null, $close = true, $selfClose = false )
    {
        //	Nah nah...
        if ( true !== $close )
        {
            $close = $selfClose = false;
        }

        $_html = static::openTag( $name, $attributes, $selfClose );

        if ( false !== $selfClose )
        {
            return $_html;
        }

        if ( null !== $value )
        {
            $_html .= trim( $value );
        }

        if ( $close )
        {
            $_html .= static::closeTag( $name );
        }

        return trim( $_html );
    }
1150344
public function addAttributes($name, $value)
    {
        if (empty($this->attributes[$name]))
            $this->attributes[$name] = [];

        $this->attributes[$name][] = $value;

        return $this;
    }
706209
public function hidden($name, $value = null, array $attributes = [])
    {
        $value = $this->getDefaultValue($name, $value);
        return $this->input('hidden', $name, $value, $attributes);
    }
1173613
public function submit($name, $value = null, $attributes = null)
    {
        return '<input type="submit" name="'.$name.'" '.(($attributes !== null) ? $this->attributes($attributes) : "").' value="'.$this->getValue($name, $value).'" />';
    }