The followings are the available columns in table:
Inheritance: extends BaseActiveRecordVersionedSoftDelete
 /**
  * Deletes rows for the model.
  */
 public function actionDelete()
 {
     $admin = new Admin(OphInBiometry_LensType_Lens::model(), $this);
     $admin->deleteModel();
 }
Esempio n. 2
0
 public function actionDeleteLensTypes()
 {
     $criteria = new CDbCriteria();
     $criteria->addInCondition('id', @$_POST['lens_type_id']);
     OphInBiometry_LensType_Lens::model()->deleteAll($criteria);
 }
        </div>

        <?php 
    echo $form->hiddenField($element, 'iol_power_' . $side, array('value' => $element->{"iol_power_{$side}"}));
} else {
    ?>
        <div class="row">
            <div class="large-12 column">
                <?php 
    //We should move this code to the controller some point of time.
    $post = Yii::app()->request->getPost('Element_OphInBiometry_Selection');
    if ($element->isNewRecord && empty($post)) {
        $element->lens_id_left = null;
        $element->lens_id_right = null;
    }
    echo $form->dropDownList($element, 'lens_id_' . $side, CHtml::listData(OphInBiometry_LensType_Lens::model()->activeOrPk($element->{'lens_id_' . $side})->findAll(array('order' => 'display_order asc')), 'id', 'name'), array('empty' => '- Please select -'), null, array('label' => 4, 'field' => 6));
    ?>
            </div>
        </div>

        <?php 
}
if (!$this->is_auto) {
    ?>
        <div class="row">
            <div class="large-12 column">
                <div class="row field-row">
                    <div class="large-4 column">
                        <span class="field-info">Lens A constant:</span>
                    </div>
                    <div class="large-8 column">
Esempio n. 4
0
 public function processJsVars()
 {
     $lens_types = array();
     foreach (OphInBiometry_LensType_Lens::model()->findAll() as $lens) {
         $lens_types[$lens->name] = array('model' => $lens->name, 'description' => $lens->description, 'acon' => (double) $lens->acon);
     }
     $this->jsVars['OphInBioemtry_lens_types'] = $lens_types;
     parent::processJsVars();
 }