Create a HTML image input element.

@param  string  $url
@param  string  $name
@param  array   $attributes
@return string
347659
public function image($url, $name = null, $attributes = array())
	{
		$attributes['src'] = $this->url->asset($url);

		return $this->input('image', $name, null, $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;
            }
        }
    }
350381
public static function buildHtmlElement($name, array $attributes = [], $content = null, $closeEmptyTag = true, array $cssClasses = []): string
    {
        $html = '<' . $name . self::buildAttrs($attributes, $cssClasses);
        if ($content !== null) {
            $html .= '>' . $content . '</' . $name . '>';
        } else {
            $html .= $closeEmptyTag ? ' />' : '>';
        }
        return $html;
    }
1237383
public function display($name = null, array $attributes = [])
    {
        return Div::make()->attributes(array_merge(
            static::prepareNameAttribute($name),
            $this->prepareAttributes($attributes)
        ));
    }
377774
final public function tag(string $name, array $attributes = [])
    {
        if ('' === $name) {
            throw new InvalidArgumentException('The tag name in "_defaults" must be a non-empty string.');
        }

        foreach ($attributes as $attribute => $value) {
            if (null !== $value && !is_scalar($value)) {
                throw new InvalidArgumentException(sprintf('Tag "%s", attribute "%s" in "_defaults" must be of a scalar-type.', $name, $attribute));
            }
        }

        $this->definition->addTag($name, $attributes);

        return $this;
    }
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).'" />';
    }
241942
public function select($name, $options = null, $attributes = array())
    {
        $attributes['name'] = $name;

        if (!isset($attributes['id'])) {
            $attributes['id'] = str_replace(array('[', ']'), array('_', ''), $name);
        }

        if (is_array($options)) {
            $options = array_merge(array('options' => array(), 'selected' => null), $options);
            $options = $this->options($options['options'], @$options['selected']);
        }

        return $this->tag('select', (string) $options, $attributes);
    }
1083240
public function css($name, $attributes = [])
    {
        $this->getLayout()->css($name, $attributes)->attachTo($this);
        return $this;
    }
388763
public function formButton($url, $method, $name, $position="BL", $attributes=array())
    {
        $attributes = array_merge(array("class"=>"btn btn-default"), $attributes);
        $this->button_container[$position][] = Form::open(array('url' => $url, 'method' => $method)).Form::submit($name, $attributes).Form::close();

        return $this;
    }
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;
    }
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).'>';
    }
279542
public function link($url, $title, $attributes = [])
    {
        $attributes['href'] = $url;
        $tag = new Tag('a', $attributes);
        $tag->setText($title);
        return $tag;
    }
1133585
public function textarea($name, $value = null, array $attributes = [])
    {
        $tag = new Tag('textarea', $attributes);
        $tag->name = $name;
        $tag->setText($this->getDefaultValue($name, $value));
        return $tag;
    }
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);
    }
307528
public static function password($name, $value, array $attributes = array())
    {
        $node = new Node\Password();

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

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

        return $node->render($attributes);
    }
365706
private static function setAttr(array $attributes, $field, $name, $type)
    {
        $attrs = '';

        if (in_array($type, array_keys(self::$preAttrs))) {
            $attributes = self::$preAttrs[$type] + $attributes;
        }

        if ($name !== null) {
            $attributes = array( 'name' => $name ) + $attributes;
        }

        if ($type !== 'select' && $type !== 'textarea' && $type !== 'form') {
            $attributes = array( 'type' => $type ) + $attributes;
        }

        foreach ($attributes as $key => $val) {
            $attrs .= ' ' . $key . '="' . self::entities($val) . '"';
        }

        return str_replace('{{attr}}', $attrs, $field);
    }
1289404
public function createElement($name, $value = null, array $attributes = [])
    {
        $node = $this->document->createElement($name);

        return new Element($node, $value, $attributes);
    }