You are here

public function TemplateManager::getTemplates in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getTemplates()
  2. 8.2 webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getTemplates()
  3. 4.x webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getTemplates()

Gets the templates for a given profile.

Parameters

\Symfony\Component\HttpKernel\Profiler\Profile $profile:

Return value

array

File

webprofiler/src/Profiler/TemplateManager.php, line 85

Class

TemplateManager
Profiler Templates Manager

Namespace

Drupal\webprofiler\Profiler

Code

public function getTemplates(Profile $profile) {
  $templates = $this
    ->getNames($profile);
  foreach ($templates as $name => $template) {
    $templates[$name] = $this->twig
      ->loadTemplate($template);
  }
  return $templates;
}