Example #1
0
 /**
  * Get view template filename basing on current route
  * If template name contains '*' it will be replaced by route action
  * If action not specified, dispatched control name is used
  *
  * @param string|null $action Action name
  *
  * @return string
  */
 public function getTemplateFilename($action = null)
 {
     if ($action === null) {
         $action = $this->getPath($this->route->getAction());
     }
     $template = mb_strtolower(str_replace('*', $action, $this->route->getTemplate()));
     return $template;
 }