Creates range input element

@param string $name Element name
@param string $value Element value
@param array $attributes Extra attributes
@return string
183195
public static function range($name, $value, array $attributes = array())
    {
        $node = new Node\Range();

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

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

        return $node->render($attributes);
    }
226364
public function createElementBySelector($selector, $value = null, array $attributes = [])
    {
        $segments = Query::getSegments($selector);

        $name = array_key_exists('tag', $segments) ? $segments['tag'] : 'div';

        if (array_key_exists('attributes', $segments)) {
            $attributes = array_merge($attributes, $segments['attributes']);
        }

        if (array_key_exists('id', $segments)) {
            $attributes['id'] = $segments['id'];
        }

        if (array_key_exists('classes', $segments)) {
            $attributes['class'] = implode(' ', $segments['classes']);
        }

        return $this->createElement($name, $value, $attributes);
    }
169915
public function text($name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build('text', $name, $value, $attributes, $extra);
    }
689747
public function addInputRange(string $name) : Element\Input\Range
    {
        $input = new Element\Input\Range($this, $name);
        $this->addComponent($name, $input);

        return $input;
    }
174465
public function addAttribute($name, $value)
    {
        if ($name === 'class') {
            $this->addAttributeClass($value);
        } elseif ($name === 'style') {
            $value = rtrim($value, ';') . ';';
            $value = explode(';', $value);
            $value = array_filter($value);

            foreach ($value as $style) {
                if (preg_match_all("/(.*)(: )(.*)/", $style, $match)) {
                    $this->addAttributeStyle($match[ 1 ][ 0 ], $match[ 3 ][ 0 ]);
                } elseif (preg_match_all("/(.*)(:)(.*)/", $style, $match)) {
                    $this->addAttributeStyle($match[ 1 ][ 0 ], $match[ 3 ][ 0 ]);
                }
            }
        } elseif (is_string($value)) {
            $this->storage[ $name ] = trim($value);
        } else {
            $this->storage[ $name ] = $value;
        }

        return $this;
    }
1187219
public function button($value, array $attributes = [])
    {
        return Button::make()->text($value)->attributes(array_merge(
            ['data-callback' => 'onSubmit'],
            $this->prepareAttributes($attributes)
        ));
    }
716135
public function email($name, $value = null, array $attributes = array(), array $extra = array())
    {
        return $this->build('email', $name, $value, $attributes, $extra);
    }
1079678
public function text($name, $value = null, array $attributes = [])
    {
        $value = $this->getDefaultValue($name, $value);
        return $this->input('text', $name, $value, $attributes);
    }
841975
public function create(string $tag = 'div', $value = null, array $attributes = []): Htmlable
    {
        if (\is_array($value)) {
            $attributes = $value;
            $value = null;
        }

        $content = '<'.$tag.$this->attributes($attributes).'>';

        if (! \is_null($value)) {
            $content .= $this->entities($value).'</'.$tag.'>';
        }

        return $this->toHtmlString($content);
    }
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));
    }
1304850
public function createNew(
        string $attribute,
        string $name,
        float $value
    ) : array {
        return $this->sendPost(
            sprintf('/profiles/%s/scores', $this->userName),
            [],
            [
                'attribute' => $attribute,
                'name'      => $name,
                'value'     => $value
            ]
        );
    }
559192
public function checkbox($name, $value = 1, $selected = null, array $attributes = array(), array $extra = array())
    {
        return $this->build('checkbox', $name, $selected, $attributes, $extra, $value);
    }
743075
public static function hidden($name, $value, array $attributes = array())
    {
        $node = new Node\Hidden();

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

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

        return $node->render($attributes);
    }
495845
public static function selectTimestamp(string $name = '', $value = 0, array $attributes = []): string
    {
        $defaultAttributes = ['method-get' => false, 'time-controll' => true];
        $userAttributes = \array_merge($defaultAttributes, $attributes);
        $timeControll = $userAttributes['time-controll'];
        $isEnabled = !isset($userAttributes['disabled']);
        $userAttributes = static::clearAttributes($userAttributes, ['time-controll']);
        $timezone = \date_default_timezone_get();

        $nameY = \sprintf('%s_y', $name);
        $nameM = \sprintf('%s_m', $name);
        $nameD = \sprintf('%s_d', $name);
        $nameH = \sprintf('%s_h', $name);
        $nameI = \sprintf('%s_i', $name);
        $nameS = \sprintf('%s_s', $name);
        $maxD = 31;

        $valY = $valM = $valD = $valH = $valI = $valS = -1;

        if (\is_array($value)) {
            $valY = $value['y'];
            $valM = $value['m'];
            $valD = $value['d'];
            $valH = \intval(0 + $value['h']);
            $valI = \intval(0 + $value['i']);
            $valS = \intval(0 + $value['s']);
        } elseif ($value != 0) {
            $valY = (new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('Y');
            $valM = (new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('n');
            $valD = (new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('j');
            $valH = \intval((new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('H'));
            $valI = \intval((new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('i'));
            $valS = \intval((new \DateTime('@'.$value))->setTimezone(new \DateTimeZone($timezone))->format('s'));
        }

        if ($valY > 0 && $valM > 0) {
            $format = \sprintf('%04s-%02s-01 00:00:00', $valY, $valM);
            $maxD = (int)(new \DateTime($format))->format('t');
        }

        $userAttributes['id'] = $nameY;
        $userAttributes['wrapper-class'] = 'year';
        $selectY = Choice::select($nameY, static::getYears(), [$valY], $userAttributes);

        $userAttributes['id'] = $nameM;
        $userAttributes['wrapper-class'] = 'month';
        $selectM = Choice::select($nameM, static::getMonths(), [$valM], $userAttributes);

        $userAttributes['id'] = $nameD;
        $userAttributes['wrapper-class'] = 'day';
        $selectD = Choice::select($nameD, static::getDays($maxD), [$valD], $userAttributes);

        $selectH = Text::inputHidden($nameH, '00', $userAttributes);
        $selectI = Text::inputHidden($nameI, '00', $userAttributes);
        $selectS = Text::inputHidden($nameS, '00', $userAttributes);

        if ($timeControll === true) {
            $userAttributes['id'] = $nameH;
            $userAttributes['wrapper-class'] = 'hour';
            $selectH = Choice::select($nameH, static::getHours(), [$valH], $userAttributes);

            $userAttributes['id'] = $nameI;
            $userAttributes['wrapper-class'] = 'minute';
            $selectI = Choice::select($nameI, static::getMinutes(), [$valI], $userAttributes);

            $userAttributes['id'] = $nameS;
            $userAttributes['wrapper-class'] = 'second';
            $selectS = Choice::select($nameS, static::getSeconds(), [$valS], $userAttributes);
        }

        $btnTitle = static::getConstant(
            'TXT_PANEL_DATA_FORM_TIMESTAMP_CONTROLL_RESET',
            'TXT_PANEL_DATA_FORM_TIMESTAMP_CONTROLL_RESET'
        );
        $resetBtn = $isEnabled ? Tags::span('', ['class' => 'timestamp-reset', 'title' => $btnTitle]) : '';
        $controll = $selectY.$selectM.$selectD.$selectH.$selectI.$selectS.$resetBtn;

        return Tags::div($controll, ['class' => 'timestamp-controll cf']);
    }
667803
public function setAttribute(string $name, string $value) : Element
    {
        $this->getTag()->setAttribute($name, $value);

        return $this;
    }
1313791
public static function input($type, $name, $value = null, $options = array())
	{
		//if (!isset($options['name'])) $options['name'] = $name;

		// We will get the appropriate value for the given field. We will look for the
		// value in the session for the value in the old input data then we'll look
		// in the model instance if one is set. Otherwise we will just use empty.
		$id = self::getIdAttribute($name, $options);

		// Once we have the type, value, and ID we can merge them into the rest of the
		// attributes array so we can convert them into their HTML attribute format
		// when creating the HTML element. Then, we will return the entire input.
		$merge = compact('type', 'name', 'value', 'id');

		$options = array_merge($options, $merge);

		return '<input' . self::attributes($options) . ' />';
	}
825228
public function withAttribute($name, $value)
    {
        $attributes = $this->getAttributes();
        if (array_key_exists($name, $attributes) && $attributes[$name] === $value) {
            return $this;
        }

        $attributes[$name] = $value;

        $newInstance = clone $this;
        $newInstance->setAttributes($attributes);
        return $newInstance;
    }