title: Cakephp How to access AppController function in ctp file?
body: <p>I am unable to access AppController.php function in my ctp file.</p>
  
  <p>Please check my code:</p>
  
  <p><strong>AppController</strong></p>
  
  <pre><code>public function commonEmotions($text=null){
          $this-&gt;loadModel("Sticker");
          $this-&gt;loadModel("Smiley");
          //Smiley
          $getSmiley=$this-&gt;Smiley-&gt;find('all',array('fields'=&gt;array('Smiley.image','Smiley.symbol')));
          $emotions=$this-&gt;Custom-&gt;parseEmotions($text,$getSmiley);
          //Sticker
          $getSticker = $this-&gt;Sticker-&gt;find('all',array('fields'=&gt;array('Sticker.uniq_id','Sticker.image')));
          $message=$this-&gt;Custom-&gt;parseStickers($emotions,$getSticker);
          return $message;
  }
  </code></pre>
  
  <p>View/Messages/news_feed.ctp</p>
  
  <pre><code>echo $this-&gt;requestAction('/app/commonEmotions/'.$getNewsFeed['News_feed']['news']);
  </code></pre>
  
  <p>When i running my code i am getting fllowing error</p>
  
  <pre><code>Notice (8): Undefined index: News_feed [APP\View\Messages\news_feed.ctp, line 188]
  
  Warning (2): Missing argument 1 for AppController::commonEmotions() [APP\Controller\AppController.php, line 51]
  </code></pre>