How to get all filters and functions available in Twig templates? I have an option to create and edit twig templates via UI but I need to display what filters and functions are available to the user but I don't know how to get them.
From procedural code:

\Drupal::service('twig')-&gt;getFilters();
\Drupal::service('twig')-&gt;getFunctions();


Unless the Twig service is overridden this is calling the methods on the vendor Twig_Environment class.

For OO code you should inject the Twig service into your class. https://drupal.org/node/2133171 and https://drupal.org/node/2203931 have some documentation and examples on how to do that.