Esempio n. 1
0
 /**
  * Render the cell.
  *
  * @return string The rendered cell.
  * @throws MissingCellViewException When a MissingTemplateException is raised during rendering.
  */
 public function render() : string
 {
     $view = new View();
     $className = substr(strrchr(get_class($this), "\\"), 1);
     $name = substr($className, 0, -4);
     $viewFile = 'Cell' . DIRECTORY_SEPARATOR . $name;
     $view->loadHelpers($this->helpers);
     try {
         return $view->render($viewFile, $this->_viewVars);
     } catch (MissingTemplateException $e) {
         throw new MissingCellViewException(['file' => $viewFile, 'name' => $name]);
     }
 }