Access an object method with Twig

Yea, it’s possible:

{{ menu.getHTML('first-string', 'second-string', ['tab1', 'tab2']) }}

Since Twig handles getters and issers automatically, you can omit the get part:

{{ menu.HTML(...) }}

Leave a Comment

tech