Created
November 6, 2015 09:44
-
-
Save anhtuank7c/a943d159841d9535cef5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use App\Event\CheckProfileListener; | |
use Cake\Event\Event; | |
/** | |
* CheckProfile trait | |
*/ | |
trait CheckProfile { | |
public function beforeFilter(Event $event) { | |
parent::beforeFilter($event); | |
$this->eventManager()->on(new CheckProfileListener($this->Auth)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
And
But cannot throw Exception