preload a component of a module

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?

Can’t you define it in modules->card->preload? Maybe preloading is module-specific.

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? ???

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?

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