OphCoTherapyapplication_DecisionTreeNode_ResponseType::getChoices PHP 메소드

getChoices() 공개 메소드

return choice options for response types that have them Note that this is hard coded for now to reduce admin overhead etc if the response types expand greatly, then it will be worth expanding this functionality to have choices defined in models.
public getChoices ( string $datatype = null ) : array
$datatype string
리턴 array $choices
    public function getChoices($datatype = null)
    {
        if ($datatype == null) {
            $datatype = $this->datatype;
        }
        if ($datatype == 'bool') {
            return array('0' => 'No', '1' => 'Yes');
        } elseif ($datatype == 'va') {
            return OphCoTherapyapplication_Helper::getInstance()->getVaListForForm();
        }
        return;
    }