Prado\Web\UI\WebControls\TCompareValidator::getClientScriptOptions PHP Method

getClientScriptOptions() protected method

Returns an array of javascript validator options.
protected getClientScriptOptions ( ) : array
return array javascript validator options.
    protected function getClientScriptOptions()
    {
        $options = parent::getClientScriptOptions();
        if (($name = $this->getControlToCompare()) !== '') {
            if (($control = $this->findControl($name)) !== null) {
                $options['ControlToCompare'] = $control->getClientID();
            }
        }
        if (($value = $this->getValueToCompare()) !== '') {
            $options['ValueToCompare'] = $value;
        }
        if (($operator = $this->getOperator()) !== TValidationCompareOperator::Equal) {
            $options['Operator'] = $operator;
        }
        $options['DataType'] = $this->getDataType();
        if (($dateFormat = $this->getDateFormat()) !== '') {
            $options['DateFormat'] = $dateFormat;
        }
        return $options;
    }