title: Cakephp 3 rendering view inside controller
body: <p>I know that it seems bad practice to render a view within a controller and then use a helper from controller. But I have one exception in our works. In cakephp 2 it was like this:</p>
  
  <pre><code>class MyController extends Controller {
      ...
      public function myFunction() {
          $this-&gt;set('pagesArray', $pagesArray);
          $this-&gt;set('sitemapType', $sitemapType);
  
          $view = new View($this);
          $viewdata = $view-&gt;render('my_function');
          file_put_contents($path, $viewdata);
          ...
          $myData = $view-&gt;Myhelper-&gt;getData();
      }
      ...
  }
  </code></pre>
  
  <p>Is this possible in cakephp 3 ?</p>