attachmentURLGenerator = $attachmentURLGenerator; $this->FAIconGenerator = $FAIconGenerator; } public function getFunctions() { return [ /* Returns the URL to a thumbnail of the given attachment */ new TwigFunction('attachment_thumbnail', [$this->attachmentURLGenerator, 'getThumbnailURL']), /* Returns the font awesome icon class which is representing the given file extension */ new TwigFunction('ext_to_fa_icon', [$this->FAIconGenerator, 'fileExtensionToFAType']), ]; } }