CakePHP: Utilizar modelos en un componente

Para poder utilizar modelos en un componente utilizando cakephp deben realizar los siguiente:

public function __construct() {
    $this->Modelo1 = ClassRegistry::init('Modelo1');
    $this->Modelo2 = ClassRegistry::init('Modelo2');
}

Fuente

Leave a Reply

Your email address will not be published. Required fields are marked *

*


Rss Feed Tweeter button Facebook button Technorati button Reddit button Linkedin button Webonews button Delicious button Digg button Flickr button Stumbleupon button Newsvine button Youtube button