I just finished reading this book and I saw that in various places, the Model’s methods are being called directly from the View.
For instance in file: trackstar/protected/views/issue/_form.php
there is this code:
<div class="row">
<?php echo $form->labelEx($model,'type_id'); ?>
<?php echo $form->dropDownList($model,'type_id', $model->getTypeOptions()); ?>
<?php echo $form->error($model,'type_id'); ?>
</div>
Wouldn’t that break the MVC practices/rules that the View should not be aware of the Model and instead the controller has to give these values directly to the View?
Or is this totally accepted in Yii?