Create a button element.

@param  string  $value
@param  array   $options
@return string
182748
public function button($value = null, $options = array())
	{
		$options = $this->appendClassToOptions('btn', $options);
		
		return parent::button($value, $options);
	}
422314
public function asImage($value, $options = [])
    {
        if ($value === null) {
            return $this->getNullDisplay();
        }

        return Html::img($value, $options);
    }
163758
public function fromString($value, $type, array $options)
    {
        return $this->convert($value, $type, $options, $this->getFromStringCallbacks());
    }
277675
public static function HtmlElement ($value, $targets, $options = []) {
		$encoding	= $options['encoding'] ?? mb_internal_encoding();

//		$html = static::SanitizeControlCode($html);
//		$html = static::SanitizeUnicodeControlCode($html);

		$html = sprintf('<?xml version="1.0" encoding="%s"?><root>%s</root>', $encoding, $value);

		$dom = new \DOMDocument;

		libxml_use_internal_errors(true);
		$dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));
		libxml_clear_errors();

		$result = [];
		foreach ($targets as $target) {
			if ($dom->getElementsByTagName($target)->length > 0) {
				$result[$target] = $target;
			}
		}

		return empty($result) ?: implode(', ', $result);
	}
448547
public static function encode($value, $options = 0): string
	{
		$flags = \PHP_VERSION_ID >= 50400
			? (\JSON_UNESCAPED_UNICODE | \JSON_UNESCAPED_SLASHES | ($options & self::PRETTY
					? \JSON_PRETTY_PRINT
					: 0))
			: 0;

		if (\PHP_VERSION_ID < 50500) {
			$json = Callback::invokeSafe('json_encode', [$value, $flags], static function ($message) { // needed to receive 'recursion detected' error

				throw new JsonException($message);
			});
		} else {
			$json = \json_encode($value, $flags);
		}

		$error = \json_last_error();

		if ($error) {
			$message = static::$messages[$error] ?? (\PHP_VERSION_ID >= 50500 ? \json_last_error_msg() : 'Unknown error');

			throw new JsonException($message, $error);
		}

		$json = \str_replace(["\xe2\x80\xa8", "\xe2\x80\xa9"], ['\u2028', '\u2029'], $json);

		return $json;
	}
266494
public function input( $type, $name, $value = null, $options = [] ) {
		$this->type = $type;

		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 = $this->get_id_attribute( $name, $options );

		if ( ! in_array( $type, $this->skip_value_types ) ) {
			$value = $this->get_value_attribute( $name, $value );
		}

		// 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', 'value', 'id' );

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

		return $this->to_html_string( '<input' . $this->attributes( $options, true ) . '>' );
	}
1131854
public function make($value, array $options = [])
    {
        $hash = password_hash($value, PASSWORD_BCRYPT, [
            'cost' => $this->cost($options),
        ]);

        if ($hash === false) {
            throw new RuntimeException('Bcrypt hashing not supported.');
        }

        return $hash;
    }
112489
public static function submit($value, array $options = [])
    {
        self::exclure($options, ['type', 'value']);

        return self::input('submit', 'null', $value, $options);
    }
867479
public function serialize($value, array $options, $mode) {
        if ($mode === self::TO && $options['encode']) {
            return serialize($value);
        }

        if ($mode === self::FROM && $options['decode']) {
            return @unserialize($value);
        }

        return $value;
    }
615829
public function wpEditor($name, $value = null, $options = array())
    {
        ob_start();

        $value = $this->getValueAttribute($name, $value);

        $value = $this->html->decode($value);

        wp_editor($value, $name, $options = array());

        $wpEditor = ob_get_contents();

        ob_end_clean();

        return $wpEditor;
    }
22523
protected function link($value, array $options)
    {
        $return = is_string($value) ? $value : (is_array($value) ? implode(',', $value) : $value);

        if ($options['link']) {
            return sprintf('<a href="%s">%s</a>', $options['link'], $return);
        }

        if ($options['route']) {
            $url = $this->generator->generate($options['route'], $options['parameters'] ?? []);

            return sprintf('<a href="%s">%s</a>', $url, $return);
        }

        return $return;
    }
969382
public function submit($value = null, $options = [])
    {
        $classes = explode(' ', isset($options['class']) ? $options['class'] : '');

        if ( ! in_array('btn', $classes)) {
            $classes[] = 'btn';
        }
        if ( ! in_array('btn-default', $classes)
            && ! in_array('btn-primary', $classes)
            && ! in_array('btn-success', $classes)
            && ! in_array('btn-info', $classes)
            && ! in_array('btn-warning', $classes)
            && ! in_array('btn-danger', $classes)
            && ! in_array('btn-link', $classes)
        ) {
            $classes[] = 'btn-default';
        }

        $options['class'] = trim(implode(' ', $classes));

        return $this->plainInput('submit', null, $value, $options);
    }
312213
public static function email($name, $value = null, array $options = [])
    {
        self::exclure($options);

        return self::input('email', $name, $value, $options);
    }
1373491
public function inputer($name, $value = null, $options = array())
    {
        $data = [
            'input_name' => $name,
            'input_id' => $name,
            'input_value' => $value
        ];
        
        // Check for class
        if (array_key_exists('class', $options)) {
            $data['wrapper_classes'] = $options['class']; // Save value
            unset($options['class']); // Remove key from array
        }
        
        // Check for ID
        if (array_key_exists('id', $options)) {
            $data['input_id'] = $options['id']; // Save value
            unset($options['id']); // Remove key from array
        }
        
        // Check for Label
        if (array_key_exists('label', $options)) {
            $data['label'] = $options['label']; // Save value
            unset($options['label']); // Remove key from array
        }
        
        // Check for Label Class
        if (array_key_exists('label_classes', $options)) {
            $data['label_classes'] = $options['label_classes']; // Save value
            unset($options['label_classes']); // Remove key from array
        }
        
        // Check for Help Text
        if (array_key_exists('help_text', $options)) {
            $data['help_text'] = $options['help_text']; // Save value
            unset($options['help_text']); // Remove key from array
        }
        
        $data['input_options'] = $options; // Remaining options
                
        return view('redminportal::partials.form-input', $data);
    }
376219
public function validate($value, $options)
	{
		$this->value = $value;
		$this->options = $options;
		$this->errors = [];

		return $this->checkIt();
	}
387899
public static function label($name, $value = null, array $options = [])
    {
        self::exclure($options, ['value', 'for']);

        self::$labels[] = $name;

        $value = e(self::formatLabel($name, $value));

        $options = Html::attributes($options);

        return '<label for="'.$name.'"'.$options.'>'.$value.'</label>';
    }
1187219
public function button($value, array $attributes = [])
    {
        return Button::make()->text($value)->attributes(array_merge(
            ['data-callback' => 'onSubmit'],
            $this->prepareAttributes($attributes)
        ));
    }