dimis283
(Dimis283)
1
I need to preload a component of a module wfCart of card.
'preload'=>array('log','wfCart','session'),
The wfCart were before a component
'components'=>array(
'wfCart' => array(
'class' => 'application.modules.card.components.wfCart.wfCart'
),...
Now I make a module card
'modules' => array(
'card' => array(
'components' => array(
'wfCart' => array(
'class' => 'application.modules.card.components.wfCart.wfCart'
) ), ),),
How can I declare at preload array the wfCart of card and so not redacler wfCart again as application component?
pestaa
(Pestaa)
2
Can’t you define it in modules->card->preload? Maybe preloading is module-specific.
dimis283
(Dimis283)
3
Now my problem is that the default controller of card can not call the model
//return the card
public function _getCard()
{ $model=new cart;
return $model->returnCart();
}
The cart model has this method, this were working before I create the module.
How modules call their model and views?
Or they can not? 
pestaa
(Pestaa)
4
Handmade modules invoke all models and views as default application module does.
Haven’t you accidentally made two cart models, so another one takes precedence over your module’s one?
dimis283
(Dimis283)
5
Edit:I rename the model and it can be found,how can I preload the wfCart at module?
Edit 2: I wrote Yii::import(‘application.modules.card.components.wfCart.wfCart’); at model and worked