예제 #1
0
 public function render(Renderable $ren, $standard = False)
 {
     //Proper error Handling would be nice (Exceptions?)
     ob_start();
     $ren->render();
     echo $standard ? $this->addBanners(ob_get_clean()) : ob_get_clean();
 }
예제 #2
0
파일: Renderer.php 프로젝트: saiber/www
 /**
  * Process
  *
  * @param Renderable $object Object to render
  * @param string $view Path to view
  * @return string Rendered output
  * @throws ViewNotFoundException if view does not exists
  */
 public function process(Renderable $object, $view)
 {
     try {
         return $object->render($this, $view);
     } catch (ViewNotFoundException $ex) {
         throw $ex;
     }
 }
 /**
  * renderFullDashboard
  * 
  * @access public
  *
  * @return mixed Value.
  */
 public function renderFullDashboard()
 {
     $template = file_get_contents(dirname(__FILE__) . '/../../assets/templates/dashboard.html');
     $r = new Renderable($template);
     $vars = array();
     $vars['header'] = $this->getHeader();
     $vars['main_content'] = $this->getDetailForm();
     $vars['has_options'] = $this->model->usesWizzard();
     if ($this->model->usesWizzard()) {
         $vars['options'] = '<h3><i>Step ' . $this->form->getCurrentStepNumber() . ': </i> ' . $this->form->getCurrentStepDisplayName() . '</h3>';
     }
     $vars['footer'] = $this->getFooter();
     echo $r->render($vars);
 }