yii\widgets\ActiveForm::getClientOptions PHP Method

getClientOptions() protected method

Returns the options for the form JS widget.
protected getClientOptions ( ) : array
return array the options.
    protected function getClientOptions()
    {
        $options = ['encodeErrorSummary' => $this->encodeErrorSummary, 'errorSummary' => '.' . implode('.', preg_split('/\\s+/', $this->errorSummaryCssClass, -1, PREG_SPLIT_NO_EMPTY)), 'validateOnSubmit' => $this->validateOnSubmit, 'errorCssClass' => $this->errorCssClass, 'successCssClass' => $this->successCssClass, 'validatingCssClass' => $this->validatingCssClass, 'ajaxParam' => $this->ajaxParam, 'ajaxDataType' => $this->ajaxDataType, 'scrollToError' => $this->scrollToError, 'scrollToErrorOffset' => $this->scrollToErrorOffset];
        if ($this->validationUrl !== null) {
            $options['validationUrl'] = Url::to($this->validationUrl);
        }
        // only get the options that are different from the default ones (set in yii.activeForm.js)
        return array_diff_assoc($options, ['encodeErrorSummary' => true, 'errorSummary' => '.error-summary', 'validateOnSubmit' => true, 'errorCssClass' => 'has-error', 'successCssClass' => 'has-success', 'validatingCssClass' => 'validating', 'ajaxParam' => 'ajax', 'ajaxDataType' => 'json', 'scrollToError' => true, 'scrollToErrorOffset' => 0]);
    }