Symfony\Bundle\FrameworkBundle\Templating\TemplateReference::getLogicalName PHP Method

getLogicalName() public method

public getLogicalName ( )
    public function getLogicalName()
    {
        return sprintf('%s:%s:%s.%s.%s', $this->get('bundle'), $this->get('controller'), $this->get('name'), $this->get('format'), $this->get('engine'));
    }

Usage Example

示例#1
0
 /**
  * @param \TYPO3\Fluid\View\StandaloneView $view
  * @param \Symfony\Bundle\FrameworkBundle\Templating\TemplateReference $templateReference
  * @return void
  */
 protected function addTemplateSource(StandaloneView &$view, TemplateReference $templateReference)
 {
     $translatedPaths = $this->environment->getTranslatedTemplatePaths();
     $templateRootPath = $translatedPaths['templateRootPath'];
     list($bundleName, $controllerName, $file) = explode(':', $templateReference->getLogicalName());
     list($action, $format, $engine) = explode('.', $file);
     $templatePathAndFilename = $templateRootPath . $controllerName . '/' . $action . '.' . $format . '.' . $engine;
     $view->setTemplatePathAndFilename($templatePathAndFilename);
 }
All Usage Examples Of Symfony\Bundle\FrameworkBundle\Templating\TemplateReference::getLogicalName