Cake\Controller\Controller::beforeFilter PHP 메소드

beforeFilter() 공개 메소드

Called before the controller action. You can use this method to configure and customize components or perform logic that needs to happen before each controller action.
public beforeFilter ( Cake\Event\Event $event ) : Response | null
$event Cake\Event\Event An Event instance
리턴 Cake\Network\Response | null
    public function beforeFilter(Event $event)
    {
        return null;
    }

Usage Example

 public function beforeFilter(Event $event)
 {
     parent::beforeFilter($event);
     //$this->Auth->allow(['view', 'index', 'checkExistence', 'edit',
     //'delete', 'add', 'twit', 'twit1', 'mention','token', 'getMention', 'mentionToDB']);
     $this->Auth->allow(['token', 'getMention']);
 }
All Usage Examples Of Cake\Controller\Controller::beforeFilter