title: use custom helper in controller cakephp 3
body: <p>I am using <code>cakephp v3</code> and want to ask how to use <code>custom helper</code> in <code>controller</code></p>
  
  <p>I have tried below code.</p>
  
  <pre><code>namespace App\Controller;
  
  use Cake\Core\Configure;
  use Cake\Network\Exception\NotFoundException;
  use Cake\View\Exception\MissingTemplateException;
  use App\Controller\AppController;
  use Cake\Event\Event;
  use Cake\Network\Request;
  use Cake\ORM\TableRegistry;
  use Cake\Auth\DefaultPasswordHasher;
  use Cake\View\View;
  use Cake\View\Helper\HtmlHelper;
  use Cake\View\Helper\UrlHelper;
  use Cake\View\Helper;
  use App\View\Helper\SecurityHelper;
  
  /**
   * Static content controller
   *
   * This controller will render views from Template/Pages/
   *
   * @link http://book.cakephp.org/3.0/en/controllers/pages-controller.html
   */
  class PagesController extends AppController {
   function beforeFilter(Event $event) {
          parent::beforeFilter($event);
  
          $this-&gt;viewBuilder()-&gt;helpers(['Security']);
  }
  
   public function receiveSaving() {
          pr(($this-&gt;request-&gt;params['id'])); //die;
          pr($this-&gt;Security-&gt;decrypt('7JCdO3vIqAU_EQUALS_')); die;
          $this-&gt;viewBuilder()-&gt;layout('front');
          $this-&gt;set('title', '');
          $this-&gt;set('meta_title', '');
          $this-&gt;set('meta_description', '');
          $this-&gt;set('meta_keywords', '');
          //$this-&gt;render('savings_bond_result');
      }
  </code></pre>
  
  <p>and getting below error.</p>
  
  <blockquote>
    <p>Error: Call to a member function decrypt() on boolean File
    D:\xampp\htdocs\myproject\src\Controller\PagesController.php Line: 204</p>
  </blockquote>
  
  <p>I tried with some other methods like</p>
  
  <pre><code>$Security = new SecurityHelper(new \Cake\View\View());
  pr($Security-&gt;decrypt('7JCdO3vIqAU_EQUALS_')); die;
  </code></pre>
  
  <blockquote>
    <p>Error: Class 'App\Controller\SecurityHelper' not found File
    D:\xampp\htdocs\myproject\src\Controller\PagesController.php Line: 204</p>
  </blockquote>