Ejemplo n.º 1
0
 /**
  * Defer to template.
  *
  * @param manage_templates_page $page
  *
  * @return string html for the page
  */
 public function render_manage_templates_page(manage_templates_page $page)
 {
     $data = $page->export_for_template($this);
     return parent::render_from_template('tool_lp/manage_templates_page', $data);
 }
Ejemplo n.º 2
0
 /**
  * Loads the data required to render the templates_manage_page template.
  *
  * @param array $pagecontext The page context info.
  * @return boolean
  */
 public static function data_for_templates_manage_page($pagecontext)
 {
     global $PAGE;
     $params = self::validate_parameters(self::data_for_templates_manage_page_parameters(), array('pagecontext' => $pagecontext));
     $context = self::get_context_from_params($params['pagecontext']);
     self::validate_context($context);
     $renderable = new output\manage_templates_page($context);
     $renderer = $PAGE->get_renderer('tool_lp');
     $data = $renderable->export_for_template($renderer);
     return $data;
 }