original_string: protected function loadTemplate($type, $path)
      {
          $class = $this->resolveTypeClassName($type);
  
          if (!($template = call_user_func([$class, 'load'], $this->theme, $path))) {
              throw new ApplicationException(trans('cms::lang.template.not_found'));
          }
  
          /**
           * @event cms.template.processSettingsAfterLoad
           * Fires immediately after a CMS template (page|partial|layout|content|asset) has been loaded and provides an opportunity to interact with it.
           *
           * Example usage:
           *
           *     Event::listen('cms.template.processSettingsAfterLoad', function ((\Cms\Controllers\Index) $controller, (mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           * Or
           *
           *     $CmsIndexController->bindEvent('template.processSettingsAfterLoad', function ((mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           */
          $this->fireSystemEvent('cms.template.processSettingsAfterLoad', [$template]);
  
          return $template;
      }
code: protected function loadTemplate($type, $path)
      {
          $class = $this->resolveTypeClassName($type);
  
          if (!($template = call_user_func([$class, 'load'], $this->theme, $path))) {
              throw new ApplicationException(trans('cms::lang.template.not_found'));
          }
  
          /**
           * @event cms.template.processSettingsAfterLoad
           * Fires immediately after a CMS template (page|partial|layout|content|asset) has been loaded and provides an opportunity to interact with it.
           *
           * Example usage:
           *
           *     Event::listen('cms.template.processSettingsAfterLoad', function ((\Cms\Controllers\Index) $controller, (mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           * Or
           *
           *     $CmsIndexController->bindEvent('template.processSettingsAfterLoad', function ((mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           */
          $this->fireSystemEvent('cms.template.processSettingsAfterLoad', [$template]);
  
          return $template;
      }
code_tokens: protected function loadTemplate ( $ type , $ path ) { $ class = $ this -> resolveTypeClassName ( $ type ) ; if ( ! ( $ template = call_user_func ( [ $ class , 'load' ] , $ this -> theme , $ path ) ) ) { throw new ApplicationException ( trans ( 'cms::lang.template.not_found' ) ) ; } /**
           * @event cms.template.processSettingsAfterLoad
           * Fires immediately after a CMS template (page|partial|layout|content|asset) has been loaded and provides an opportunity to interact with it.
           *
           * Example usage:
           *
           *     Event::listen('cms.template.processSettingsAfterLoad', function ((\Cms\Controllers\Index) $controller, (mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           * Or
           *
           *     $CmsIndexController->bindEvent('template.processSettingsAfterLoad', function ((mixed) $templateObject) {
           *         // Make some modifications to the $template object
           *     });
           *
           */ $ this -> fireSystemEvent ( 'cms.template.processSettingsAfterLoad' , [ $ template ] ) ; return $ template ; }
docstring: Returns an existing template of a given type
  @param string $type
  @param string $path
  @return mixed
docstring_tokens: Returns an existing template of a given type