CakePHP: Use models in components with ClassRegistry::init()
To import a model into a component, simply use:
$this->modelHandle = ClassRegistry::init('modelName');This can then be called just like any other model in a regular controller.
To import a model into a component, simply use:
$this->modelHandle = ClassRegistry::init('modelName');This can then be called just like any other model in a regular controller.