Closed jcrombez closed 10 years ago
Hi,
The twig service is private because you should only access the twig environnement into a twig template.
If you want to crop, you can call your wanted filter service. Note the service declaration : https://github.com/V-labs/VlabsMediaBundle/blob/master/Resources/config/services.xml#L43-L48
I need to crop an avatar in my controller in order to give a resized avatar in a json response of a REST API.
I tried calling the twig filter but it's not public.
Is there a way to achieve that ? Is there a reason for the twig extension service not to be public ?