merchantRepository = $merchantRepository; $this->sectionRepository = $sectionRepository; } public function getFunctions() { return array( new TwigFunction('carac_sections', [$this, 'getSections']), new TwigFunction('carac_merchants', [$this, 'getMerchants']), ); } public function getSections() { return $this->sectionRepository->findAll(); } public function getMerchants() { return $this->merchantRepository->findAll(); } }