Controller Name: StagesController
Function Name: getStageByEntity
Parameter: CustomerQuotation
$this->controller->requestAction('Stages/getStageByEntity/CustomerQuotation')
function getStageByEntity($entity){
$this->loadModel($entity);
$stage = $this->Stage->find('first',array('conditions'=>array('Stage.entity'=>$entity) ) );
return $stage;
}
http://book.cakephp.org/2.0/en/controllers.html#Controller::requestAction
If you want to access any model from component
use
$this->controller
and add Model in $uses = array()
as
$this->controller->$ModelName->find('all');