title: How to register filters (formerly helpers) in Latte?
body: <p>I would like to create my own filter for <a href="http://latte.nette.org/en/" rel="nofollow noreferrer">Latte templating engine</a>. There is an example in their documentation but it doesn't describe how to register it inside presenter.</p>
  <pre class="lang-php prettyprint-override"><code>
  $latte = new Latte\Engine;
  $latte-&gt;addFilter('myFilter', function ($s) {
      return someMagic($s)
  });
  </code></pre>
  <p>I bet there will be simple way to get instance of Latte\Engine inside presenter but I'm not sure how.</p>