Browse Source

Use initialize

Mark Scherer 11 years ago
parent
commit
10e282067b
1 changed files with 2 additions and 8 deletions
  1. 2 8
      src/Controller/Component/Component.php

+ 2 - 8
src/Controller/Component/Component.php

@@ -15,14 +15,8 @@ class Component extends CakeComponent {
 	 */
 	public $Controller;
 
-	/**
-	 * Component::beforeFilter()
-	 *
-	 * @param \Cake\Event\Event $event
-	 * @return void
-	 */
-	public function beforeFilter(Event $event) {
-		$this->Controller = $event->subject();
+	public function initialize(array $config) {
+		$this->Controller = $this->_registry->getController();
 	}
 
 }