OEModule\OphCiExamination\models\OphCiExamination_ManagementSurgery::model PHP Method

model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : OphCiExamination_GlaucomaStatusa
return OphCiExamination_GlaucomaStatusa the static model class
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

Usage Example

$usedDrops = array();
if (isset($element->right_drops_id)) {
    $usedDrops[] = $element->right_drops_id;
}
if (isset($element->left_drops_id)) {
    $usedDrops[] = $element->left_drops_id;
}
$dropsIds = CHtml::listData(\OEModule\OphCiExamination\models\OphCiExamination_Drops::model()->activeOrPk($usedDrops)->findAll(array('order' => 'display_order asc')), 'id', 'name');
$usedSurgeryIds = array();
if (isset($element->right_surgery_id)) {
    $usedSurgeryIds[] = $element->right_surgery_id;
}
if (isset($element->left_surgery_id)) {
    $usedSurgeryIds[] = $element->left_surgery_id;
}
$surgeryIds = CHtml::listData(\OEModule\OphCiExamination\models\OphCiExamination_ManagementSurgery::model()->activeOrPk($usedSurgeryIds)->findAll(array('order' => 'display_order asc')), 'id', 'name');
$iop = $element->getLatestIOP($this->patient);
Yii::app()->clientScript->registerScriptFile("{$this->assetPath}/js/CurrentManagement.js", CClientScript::POS_HEAD);
?>
<div class="element-fields element-eyes row">
	<script type="text/javascript">
		var previous_iop = <?php 
echo json_encode($iop);
?>
;
	</script>
	<?php 
echo $form->hiddenInput($element, 'eye_id', false, array('class' => 'sideField'));
?>
	<div class="element-eye right-eye column left side<?php 
if (!$element->hasRight()) {