/** * {@inheritDoc} */ protected function _template(\Exception $exception, $method, $code) { if ($code === 503) { return 'maintenance'; } return parent::_template($exception, $method, $code); }
/** * Make CrudView exception rendering templates work * * @param \CrudViews\Error\Exception $exception * @param type $method * @param type $code * @return string */ protected function _template(Exception $exception, $method, $code) { parent::_template($exception, $method, $code); if (in_array($this->template, $this->_exceptions)) { $this->template = 'CrudViews.' . $this->template; } return $this->template; }