getViewTemplateUris() публичный Метод

Returns a list of template URIs for a specific component, view, template and sub-template. The $parameters array can have any of the following keys: component string The name of the component, e.g. com_something view string The name of the view layout string The name of the layout tpl string The name of the subtemplate strictView bool Should I only look in the specified view, or should I look in the pluralised/singularised view as well? strictLayout bool Should I only look for this layout, or also for the default layout? strictTpl bool Should I only look for this subtemplate or also for no subtemplate? sidePrefix string The application side prefix (site, admin, auto, any)
public getViewTemplateUris ( array $parameters ) : array
$parameters array See above
Результат array
Пример #1
0
 /**
  * Our function uses loadAnyTemplate to provide smarter view template loading.
  *
  * @param   string  $tpl    The name of the template file to parse
  * @param   boolean $strict Should we use strict naming, i.e. force a non-empty $tpl?
  *
  * @return  mixed  A string if successful, otherwise an Exception
  */
 public function loadTemplate($tpl = null, $strict = false)
 {
     $result = '';
     $uris = $this->viewFinder->getViewTemplateUris(array('component' => $this->container->componentName, 'view' => $this->getName(), 'layout' => $this->getLayout(), 'tpl' => $tpl, 'strictTpl' => $strict));
     foreach ($uris as $uri) {
         try {
             $result = $this->loadAnyTemplate($uri);
             break;
         } catch (\Exception $e) {
             $result = $e;
         }
     }
     if ($result instanceof \Exception) {
         $this->container->platform->raiseError($result->getCode(), $result->getMessage());
     }
     return $result;
 }