public function TemplateManager::getName in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getName()
- 8 webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getName()
- 4.x webprofiler/src/Profiler/TemplateManager.php \Drupal\webprofiler\Profiler\TemplateManager::getName()
Gets the template name for a given panel.
Parameters
Profile $profile:
string $panel:
Return value
mixed
Throws
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
File
- webprofiler/
src/ Profiler/ TemplateManager.php, line 68
Class
- TemplateManager
- Profiler Templates Manager
Namespace
Drupal\webprofiler\ProfilerCode
public function getName(Profile $profile, $panel) {
$templates = $this
->getNames($profile);
if (!isset($templates[$panel])) {
throw new NotFoundHttpException(sprintf('Panel "%s" is not registered in profiler or is not present in viewed profile.', $panel));
}
return $templates[$panel];
}