. /** * renderers/core_renderer.php * * @package theme_klass * @copyright 2015 onwards LMSACE Dev Team (http://www.lmsace.com) * @author LMSACE Dev Team * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die(); /** * Klass theme core renderer class * @copyright 2015 onwards LMSACE Dev Team (http://www.lmsace.com) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class theme_klass_core_renderer extends theme_boost\output\core_renderer { /** * Header custom menu renderer. * * @param custom_menu $menu * @return string */ public function custom_menu_render(custom_menu $menu) { global $CFG; $langs = get_string_manager()->get_list_of_translations(); $haslangmenu = $this->lang_menu() != ''; if (!$menu->has_children() && !$haslangmenu) { return ''; } $content = ''; foreach ($menu->get_children() as $item) { $context = $item->export_for_template($this); $content .= $this->render_from_template('theme_klass/custom_menu_item', $context); } return $content; } }