This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » eZ Publish 5 Platform » How to load legacy kernel from a twig...
expandshrink

How to load legacy kernel from a twig extension

How to load legacy kernel from a twig extension

Tuesday 25 November 2014 2:07:03 pm - 3 replies

Hi everyone, 

How can I load the legacy kernel from a twig extension ?

In my extension class extended from \Twig_Extension, I wrote this

$this->getLegacyKernel()->runCallback(...);

but I have an error which says that getLegacyKernel() is undefined

What should I load in order to make it works ?

Thanks a lot for your help

Tuesday 25 November 2014 4:42:27 pm

You could inject @ezpublish_legacy.kernel as one of the arguments in the extension configuration in services.yml

Tuesday 25 November 2014 4:58:55 pm

Peter was faster this time. I was gonna say exactly the same happy.gif Emoticon

Tuesday 25 November 2014 5:58:32 pm

Gold medals for the both of you, because it works absolutely fine !! big-smile.gif Emoticon

Thanks a lot for your help

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from