在YII中从另一个模块导入一个模块


Import one module from other in YII

我在YII中有两个不同的模块-事件,邀请。

当我使用邀请模块时,我想访问其他模块。我如何导入它?

如果您想在邀请中使用事件模型,那么在您的邀请模块InvitationModule.php init()

中添加以下代码
public function init()
{
  // importing al models, components from event
  $this->setImport(array(
            // already you have list for invitation module
            'event.models.*', // event is alias name for event module.
            'event.components.*',

        ));
}