Example #1
0
 protected function _toHtml()
 {
     if (!($template = $this->getTemplate())) {
         Log::instance()->log('No template defined for chart with ID "' . $this->getId() . '", skipping.', LOG_ERR);
         return;
     }
     $fw = \Base::instance();
     if ($this->getEscapeHives() != $fw->get('ESCAPE')) {
         $esc = $fw->get('ESCAPE');
         $fw->set('ESCAPE', $this->getEscapeHives());
     }
     $html = View::instance()->render($template, $this->getMimetype(), $this->getData());
     if ($this->getEscapeHives()) {
         $fw->set('ESCAPE', $esc);
     }
     return $html;
 }
 /**
  * @return View
  */
 public function getView()
 {
     return $this->_viewInstance ? $this->_viewInstance : View::instance();
 }