/** * Renders mr_html_tabs * * @param mr_html_tabs $tabs mr_html_tabs instance * @return string */ protected function render_mr_html_tabs(mr_html_tabs $tabs) { $rows = $tabs->get_rows(); $output = ''; if (!empty($rows)) { $inactive = $active = array(); if (count($rows) == 2 and !empty($tabs->subtab) and !empty($rows[1][$tabs->subtab])) { $active[] = $tabs->toptab; $currenttab = $tabs->subtab; } else { $currenttab = $tabs->toptab; } $output = html_writer::tag('div', print_tabs($rows, $currenttab, $inactive, $active, true), array('class' => 'mr_html_tabs')); } return $output; }