public function heading($text, array $options = [], $small = null, array $smallOptions = [])
    {
        $options = optionsParser($options);
        $type = $options->consume('type');
        $type = is_string($type) && preg_match('/^h[1-6]$/', $type) ? $type : 'h2';

        $text = $small ? sprintf('%s %s', $text, self::small($small, $smallOptions)) : $text;

        return self::tag($type, $text, $options->toArray());
    }
public function heading($text, array $options = [], $small = null, array $smallOptions = [])
    {
        $options = optionsParser($options);
        $type = $options->consume('type');
        $type = is_string($type) && preg_match('/^h[1-6]$/', $type) ? $type : 'h2';

        $text = $small ? sprintf('%s %s', $text, self::small($small, $smallOptions)) : $text;

        return self::tag($type, $text, $options->toArray());
    }
public function heading ( $ text , array $ options = [ ] , $ small = null , array $ smallOptions = [ ] ) { $ options = optionsParser ( $ options ) ; $ type = $ options -> consume ( 'type' ) ; $ type = is_string ( $ type ) && preg_match ( '/^h[1-6]$/' , $ type ) ? $ type : 'h2' ; $ text = $ small ? sprintf ( '%s %s' , $ text , self :: small ( $ small , $ smallOptions ) ) : $ text ; return self :: tag ( $ type , $ text , $ options -> toArray ( ) ) ; }
Creates an heading, according to Bootstrap.

This method is useful if you want to create an heading with a secondary
text. In this case you have to use the `small` option.

By default, this method creates an `<h2>` tag. To create a different
tag, you have to use the `type` option.
@param string $text Heading text
@param array $options Array of options and HTML attributes
@param string|null $small Small text
@param array $smallOptions Array of options and HTML attributes
@return string
@see http://getbootstrap.com/css/#type-headings Bootstrap documentation
@uses small()
@uses tag()
Creates an heading according to Bootstrap .