public function __construct(KernelInterface $kernel) { parent::__construct($kernel); $this->getContainer()->set('header', $this); // grab from the reference $this->URL = $this->getContainer()->get('url'); $this->tpl = $this->getContainer()->get('template'); }