OEModule\OphCiExamination\controllers\DefaultController::actionGetDisorder PHP Method

actionGetDisorder() public method

Used when eyedraw elements have doodles that are associated with disorders
public actionGetDisorder ( )
    public function actionGetDisorder()
    {
        if (!@$_GET['disorder_id']) {
            return;
        }
        if (!($disorder = \Disorder::model()->findByPk(@$_GET['disorder_id']))) {
            throw new \Exception('Unable to find disorder: ' . @$_GET['disorder_id']);
        }
        header('Content-type: application/json');
        echo json_encode(array('id' => $disorder->id, 'name' => $disorder->term));
        Yii::app()->end();
    }
DefaultController