Exemplo n.º 1
0
 /**
  * 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 $id the ID of the model to be loaded
  * @return Metrica the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Metrica::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemplo n.º 2
0
<div class="row">
	<?php 
echo $form->labelEx($model, 'id_aspecto');
?>
			<?php 
echo $form->dropDownList($model, 'id_aspecto', CHtml::listData(Aspecto::model()->findAll(), 'id_aspecto', 'nombre_aspecto'));
?>
	</div>


	<div class="row">
		<?php 
echo $form->labelEx($b, 'id_metrica');
?>
			<?php 
echo $form->dropDownList($b, 'id_metrica', CHtml::listData(Metrica::model()->findAll(), 'id_metrica', 'nombre_metrica', 'valor'), array('multiple' => true));
?>
		</div>

<div class="row">
	<?php 
echo $form->labelEx($model, 'estatus_pregunta');
?>
		<?php 
$options = array('1' => 'Activa', '0' => 'Inactivo');
echo CHtml::dropDownList('estatus_pregunta', '1', $options);
?>
	</div>


	<div class="row buttons">