. /** * Contains the default content output class. * * @package format_topics * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ namespace format_topics\output\courseformat; use core_courseformat\output\local\content as content_base; use renderer_base; /** * Base class to render a course content. * * @package format_topics * @copyright 2020 Ferran Recio * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class content extends content_base { /** * @var bool Topic format has add section after each topic. * * The responsible for the buttons is core_courseformat\output\local\content\section. */ protected $hasaddsection = false; /** * Export this data so it can be used as the context for a mustache template (core/inplace_editable). * * @param renderer_base $output typically, the renderer that's calling this function * @return stdClass data context for a mustache template */ public function export_for_template(renderer_base $output) { global $PAGE; $PAGE->requires->js_call_amd('format_topics/mutations', 'init'); $PAGE->requires->js_call_amd('format_topics/section', 'init'); return parent::export_for_template($output); } }