public function render($template, $parameters) { if (strpos($template, ':') === false) { //there is no package name, we should add it $template = $this->getPackageName() . ':' . $template; } return $this->container->getTemplating()->render($template, $parameters); }
/** * @TODO: should have some BlockBuilder? BlockConfigurationBuilder? instead * * @param Config\BlockConfig $config */ protected function initialize(Config\BlockConfig $config) { $templating = $this->container->getTemplating(); if (!$templating instanceof TwigTemplating) { throw new \RuntimeException('Twig templating engine is required.'); } $config->initialize($templating->getTwig()); }