echo $form->labelEx($model, 'show_in_menu'); ?> <?php echo $form->checkBox($model, 'show_in_menu', !empty($model->show_in_menu) && $model->show_in_menu == 1 ? array('checked' => 'checked') : array()); ?> <?php echo $form->error($model, 'show_in_menu'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'place_holder_id'); ?> <?php echo $form->dropDownList($model, 'place_holder_id', PlaceHolders::loadItems()); ?> <?php echo $form->error($model, 'place_holder_id'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'application_id'); ?> <?php echo $form->dropDownList($model, 'application_id', Applications::loadItems()); ?> <?php echo $form->error($model, 'application_id');
/** * Returns the data model based on the primary key given in the GET variable. * If the data model is not found, an HTTP exception will be raised. * @param integer the ID of the model to be loaded */ public function loadModel($id) { $model = PlaceHolders::model()->findByPk($id); if ($model === null) { Yii::log('The requested page does not exist.'); throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }