/** * {@inheritdoc} */ public function initRuntime(Twig_Environment $environment) { /** @var $environment sfTwigEnvironment */ if ($environment instanceof sfTwigEnvironment) { $this->sfContext = $environment->getContext(); } else { throw new \InvalidArgumentException('$environment must be instance of sfTwigEnvironment class'); } parent::initRuntime($environment); }
public function initRuntime(\Twig_Environment $environment) { parent::initRuntime($environment); $this->directory = $this->app['request']->getBasePath(); if (isset($this->options['asset.directory'])) { $this->directory = $this->options['asset.directory']; } if (isset($this->options['asset.version'])) { $this->version = $this->options['asset.version']; } }
public function initRuntime(\Twig_Environment $environment) { $this->twig = $environment; parent::initRuntime($environment); }
public function initRuntime(\Twig_Environment $environment) { parent::initRuntime($environment); $this->twig = $environment->loadTemplate($this->template); }
/** * Init runtime * * @access public */ public function initRuntime(\Twig_Environment $environment) { parent::initRuntime($environment); $this->environment = $environment; }