twig = $twig; } /** * {@inheritdoc} */ public function getName() { return 'dcg_renderer'; } /** * Renders a template. * * @param string $template * Twig template. * @param array $vars * Template variables. * * @return string * A string representing the rendered output. */ public function render($template, array $vars) { return $this->twig->render($template, $vars); } /** * Adds a path where templates are stored. * * @param string $path * A path where to look for templates. */ public function addPath($path) { return $this->twig->getLoader()->addPath($path); } }