将不同的$model传递到 renderPartial 中


passing a different $model into renderPartial

我正在使用 Yii 1.1.15 并且正在调用从 1 个模块到另一个模块的视图,并希望将计算器模型作为$model传递,以便我可以访问attributeLabels()

在我的第一个模块视图中,我有这段代码

<?php $this->renderPartial('application.modules.calculators.views.calculators._no_header-calculator', array('model'=>CalculatorsForm::model(), 'form'=>$form), false); ?>

_no_header-calculator我有这个

<?php echo $form->labelEx($model,'yearloan'); ?>

问题是我收到此错误,知道为什么吗?

include(CalculatorsForm.php): failed to open stream: No such file or directory 

尝试包括模型 1st,然后使用 new CalculatorsForm

<?php 
Yii::import('application.modules.calculators.models.CalculatorsForm');
$this->renderPartial('application.modules.calculators.views.calculators._no_header-calculator', array('model'=>new CalculatorsForm, 'form'=>$form), false); 
?>