model() public static method

Returns the static model of the specified AR class.
public static model ( $className = __CLASS__ ) : the
return the static model class
$antiseptic_drugs = OphTrIntravitrealinjection_AntiSepticDrug::model()->with('allergies')->activeOrPk($element->{$side . '_pre_antisept_drug_id'})->findAll();
$antiseptic_drugs_opts = array('empty' => '- Please select -', 'nowrapper' => true, 'options' => array());
$antiseptic_allergic = false;
foreach ($antiseptic_drugs as $drug) {
    $opts = array();
    foreach ($drug->allergies as $allergy) {
        if ($this->patient->hasAllergy($allergy)) {
            $opts['data-allergic'] = 1;
            if ($drug->id == $element->{$side . '_pre_antisept_drug_id'}) {
                $antiseptic_allergic = true;
            }
        }
    }
    $antiseptic_drugs_opts['options'][(string) $drug->id] = $opts;
}
$skin_drugs = OphTrIntravitrealinjection_SkinDrug::model()->with('allergies')->activeOrPk($element->{$side . '_pre_skin_drug_id'})->findAll();
$skin_drugs_opts = array('empty' => '- Please select -', 'nowrapper' => true, 'options' => array());
$skin_allergic = false;
foreach ($skin_drugs as $drug) {
    $opts = array();
    foreach ($drug->allergies as $allergy) {
        if ($this->patient->hasAllergy($allergy)) {
            $opts['data-allergic'] = 1;
            if ($drug->id == $element->{$side . '_pre_skin_drug_id'}) {
                $skin_allergic = true;
            }
        }
    }
    $skin_drugs_opts['options'][(string) $drug->id] = $opts;
}
?>