public function getTemplatePaths() { $templatesPaths = []; if ('' == $this->getModuleName()) { $templatesPaths[] = $this->app->getPath() . DS . 'Templates' . DS . str_replace('\\', DS, $this->getShortName()); } else { $templatesPaths[] = $this->app->getPath() . DS . 'Modules' . DS . $this->getModuleName() . DS . 'Templates' . DS . str_replace('\\', DS, $this->getShortName()); } if ('' != $this->getModuleName() && is_readable($moduleLayoutPath = $this->app->getPath() . DS . 'Layouts' . DS . $this->getModuleName())) { $templatesPaths[] = $moduleLayoutPath; } $templatesPaths[] = $this->app->getPath() . DS . 'Layouts'; return $templatesPaths; }