public function __construct(KernelInterface $kernel) { parent::__construct($kernel); // grab stuff from the reference and store them in this object (for later/easy use) $this->tpl = $this->getContainer()->get('template'); }