Esempio n. 1
0
 /**
  * @param $view
  * @param $model
  * @param array $params
  * @return string
  */
 public function renderRead($view, $model, $params = [])
 {
     $prefix = Util::getEntityPrefix($model);
     $pathMap = [$prefix . "-" . $model->getPrimaryKey(), $view];
     if ($model->hasAttribute("slug")) {
         array_unshift($pathMap, $prefix . "-" . $model->getAttribute("slug"));
     }
     $content = $this->getView()->renderRead($pathMap, $params, $this);
     return $this->renderContent($content);
 }