Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-12617

Make the Twig environment available

    XMLWordPrintable

Details

    Description

      Twig is a very powerful template engine but we use a bridge (symbolized by the \phpbb\template\template interface) to integrate it. So we can't really use some of the most powerful features of Twig (ie: we can't get the template himself to call the renderBlock() method so we can't really exploit the template inheritance feature).

      But this issue is complicated, because if we want to use these functionality we have to know that we are using twig so either we drop the generic interface and we directly extend twig or we add a get_engine() method in the interface and we let the user manage with that.

      I don't see another answer...

      Btw it could be useful to add some filter and function usually defined by the TwigBridge (like path(), render() or stopwatch in a debug environment) but it's an other issue.

      Attachments

        Issue Links

          Activity

            People

              nicofuma nicofuma
              nicofuma nicofuma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: