protected _getViewFileName ( mixed $name = null ) : void | ||
$name | mixed | |
Результат | void |
protected function _getViewFileName($name = null)
{
$name = $name ?: $this->view;
$this->subDir = $this->apiFormat;
try {
return parent::_getViewFileName($name);
} catch (MissingViewException $exception) {
}
try {
return parent::_getViewFileName(DS . $this->apiFormat . DS . $name);
} catch (MissingViewException $e) {
if (isset($this->viewVars['success']) || isset($this->viewVars['data'])) {
return parent::_getViewFileName(DS . $this->apiFormat . DS . 'fallback_template');
}
throw $e;
}
}