|
@@ -47,7 +47,8 @@ class ComponentRegistry extends ObjectRegistry implements EventDispatcherInterfa
|
|
|
*/
|
|
*/
|
|
|
public function __construct(Controller $controller)
|
|
public function __construct(Controller $controller)
|
|
|
{
|
|
{
|
|
|
- $this->setController($controller);
|
|
|
|
|
|
|
+ $this->_Controller = $controller;
|
|
|
|
|
+ $this->setEventManager($controller->getEventManager());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -61,20 +62,6 @@ class ComponentRegistry extends ObjectRegistry implements EventDispatcherInterfa
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * Set the controller associated with the collection.
|
|
|
|
|
- *
|
|
|
|
|
- * @param \Cake\Controller\Controller $controller Controller instance.
|
|
|
|
|
- * @return $this
|
|
|
|
|
- */
|
|
|
|
|
- public function setController(Controller $controller)
|
|
|
|
|
- {
|
|
|
|
|
- $this->_Controller = $controller;
|
|
|
|
|
- $this->setEventManager($controller->getEventManager());
|
|
|
|
|
-
|
|
|
|
|
- return $this;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
* Resolve a component classname.
|
|
* Resolve a component classname.
|
|
|
*
|
|
*
|
|
|
* Part of the template method for {@link \Cake\Core\ObjectRegistry::load()}.
|
|
* Part of the template method for {@link \Cake\Core\ObjectRegistry::load()}.
|