OEModule\OphCiExamination\controllers\OEScapeDataController::actionLoadImage PHP Метод

actionLoadImage() публичный Метод

public actionLoadImage ( $id, $eventDate, $side, $eventType, $mediaType )
    public function actionLoadImage($id, $eventDate, $side, $eventType, $mediaType)
    {
        // get the closest VF event and image based on the eventDate
        $command = Yii::app()->db->createCommand()->select('max(id) as fileid')->from('media_data')->where('patient_id = :patient', array('patient' => $id))->andWhere('event_date <= :eventDate', array('eventDate' => $eventDate))->andWhere('eye_id = :side', array('side' => $side))->andWhere('event_type_id = (SELECT id FROM event_type WHERE class_name= :eventType)', array('eventType' => $eventType))->andWhere('media_type_id = (SELECT id FROM media_type WHERE type_name =:mediaType)', array('mediaType' => $mediaType));
        if ($row = $command->queryRow()) {
            echo $this->renderPartial('//oescape/vfgreyscale_side', array('fileid' => $row['fileid']));
        }
        //echo $fileId;
    }