public function heading($text, $level = 2, $classes = null, $id = null) {
        $level = (integer) $level;
        if ($level < 1 or $level > 6) {
            throw new coding_exception('Heading level must be an integer between 1 and 6.');
        }
        return html_writer::tag('h' . $level, $text, array('id' => $id, 'class' => renderer_base::prepare_classes($classes)));
    }
public function heading($text, $level = 2, $classes = null, $id = null) {
        $level = (integer) $level;
        if ($level < 1 or $level > 6) {
            throw new coding_exception('Heading level must be an integer between 1 and 6.');
        }
        return html_writer::tag('h' . $level, $text, array('id' => $id, 'class' => renderer_base::prepare_classes($classes)));
    }
public function heading ( $ text , $ level = 2 , $ classes = null , $ id = null ) { $ level = ( integer ) $ level ; if ( $ level < 1 or $ level > 6 ) { throw new coding_exception ( 'Heading level must be an integer between 1 and 6.' ) ; } return html_writer :: tag ( 'h' . $ level , $ text , array ( 'id' => $ id , 'class' => renderer_base :: prepare_classes ( $ classes ) ) ) ; }
Outputs a heading

@param string $text The text of the heading
@param int $level The level of importance of the heading. Defaulting to 2
@param string $classes A space-separated list of CSS classes. Defaulting to null
@param string $id An optional ID
@return string the HTML to output.
Outputs a heading