示例#1
0
 private function getBundleTwigPathname(Twig_Template $instance)
 {
     $templateName = $instance->getTemplateName();
     $parts = explode(':', $templateName);
     $bundlePath = $this->appKernel->getBundle($parts[0])->getPath();
     return $bundlePath . implode('/', ['/Resources/views/', $parts[1], $parts[2]]);
 }