Example #1
0
 /**
  * {@inheritDoc}
  *
  * Adds fallback functionality, if layout is not found it uses QuickAppsCMS's
  * `default.ctp` as it will always exists.
  */
 protected function _getLayoutFileName($name = null)
 {
     try {
         $filename = parent::_getLayoutFileName($name);
     } catch (\Exception $e) {
         $filename = parent::_getLayoutFileName('default');
     }
     return $filename;
 }
Example #2
0
 protected function _getLayoutFileName($name = null)
 {
     // @codingStandardsIgnoreEnd
     $rethrow = new \Exception('You\'re not supposed to get here');
     foreach ($this->extensions as $extension) {
         $this->_ext = $extension;
         try {
             return parent::_getLayoutFileName($name);
         } catch (\Exception $exception) {
             $rethrow = $exception;
         }
     }
     throw $rethrow;
 }
Example #3
0
 /**
  * Returns layout filename for this template as a string.
  *
  * @param string|null $name
  * @return string
  */
 protected function _getLayoutFileName($name = null)
 {
     $rethrow = new \Exception("You're not supposed to get here.");
     foreach ($this->extensions as $extension) {
         $this->_ext = $extension;
         try {
             return parent::_getLayoutFileName($name);
         } catch (\Exception $e) {
             $rethrow = $e;
         }
     }
     throw $rethrow;
 }