/** * Get html to display on the page. * * @param renderable $renderable renderable widget * * @return string to display on the mangerules page. */ protected function render_table(renderable $renderable) { $o = ''; ob_start(); $renderable->out($renderable->pagesize, true); $o = ob_get_contents(); ob_end_clean(); return $o; }
public function render_in_page() { renderable::render_with_vars($this->in_page_template(), array('user' => $this)); }
/** * Render a modchooser. * * @param renderable $modchooser The chooser. * @return string */ public function render_modchooser(renderable $modchooser) { return $this->render_from_template('core_course/modchooser', $modchooser->export_for_template($this)); }
public function render_as_page() { renderable::render_with_vars($this->as_page_template(), array('page' => $this, 'url_path' => $GLOBALS['url_path'])); }
/** * Render a qbank_chooser. * * @param renderable $qbankchooser The chooser. * @return string */ public function render_qbank_chooser(renderable $qbankchooser) { return $this->render_from_template('core_question/qbank_chooser', $qbankchooser->export_for_template($this)); }
/** * To display the generated HTML * @param renderable $renderable */ protected function render_flavours_generatedefaults_execute(renderable $renderable) { // Display info about the execution (was local/defaults.php overwritten?) $class = 'generalbox ' . $renderable->get_info()->class; $output = $this->output->box($renderable->get_info()->text, $class); // The php code to copy & paste $userfriendlycode = '<?php<br/><br/>'; $userfriendlycode .= implode('<br/>', $renderable->get_phparray()); $userfriendlycode .= '<br/><br/>'; $userfriendlycode .= '// It ends after this two comment lines, there is no php closing tag in this file,<br/>'; $userfriendlycode .= '// it is intentional because it prevents trailing whitespace problems!<br/><br/>'; $output .= $this->output->box($userfriendlycode, 'configphp'); return $output; }
public function render_in_page() { $results = $GLOBALS['db']->fetch($this->details, $this->result_type); renderable::render_with_vars($this->in_page_template(), array('view' => $this, 'results' => $results)); }