protected function validateDataStore()
    {
        $field = 'data';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating()) {
            if (!isset($value)) {
                $this->unsetSubmitted($field);
                return null;
            }
        } else if (empty($value)) {
            $value = $this->store->getConfig(null, $this->store->getDefault());
            // Will be set later
            unset($value['title'], $value['meta_title']);
        }

        if (!is_array($value)) {
            $this->setErrorInvalid($field, $this->translation->text('Settings'));
            return false;
        }

        $this->setSubmitted('data', $value);

        $this->validateDataTitleStore();
        $this->validateDataEmailStore();
        $this->validateDataMapStore();
        $this->validateDataMetaTitleStore();
        $this->validateDataMetaDescriptionStore();
        $this->validateDataTranslationStore();
        $this->validateDataThemeStore();

        return !$this->isError();
    }
protected function validateDataStore()
    {
        $field = 'data';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating()) {
            if (!isset($value)) {
                $this->unsetSubmitted($field);
                return null;
            }
        } else if (empty($value)) {
            $value = $this->store->getConfig(null, $this->store->getDefault());
            // Will be set later
            unset($value['title'], $value['meta_title']);
        }

        if (!is_array($value)) {
            $this->setErrorInvalid($field, $this->translation->text('Settings'));
            return false;
        }

        $this->setSubmitted('data', $value);

        $this->validateDataTitleStore();
        $this->validateDataEmailStore();
        $this->validateDataMapStore();
        $this->validateDataMetaTitleStore();
        $this->validateDataMetaDescriptionStore();
        $this->validateDataTranslationStore();
        $this->validateDataThemeStore();

        return !$this->isError();
    }
protected function validateDataStore ( ) { $ field = 'data' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) ) { if ( ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } } else if ( empty ( $ value ) ) { $ value = $ this -> store -> getConfig ( null , $ this -> store -> getDefault ( ) ) ; // Will be set later unset ( $ value [ 'title' ] , $ value [ 'meta_title' ] ) ; } if ( ! is_array ( $ value ) ) { $ this -> setErrorInvalid ( $ field , $ this -> translation -> text ( 'Settings' ) ) ; return false ; } $ this -> setSubmitted ( 'data' , $ value ) ; $ this -> validateDataTitleStore ( ) ; $ this -> validateDataEmailStore ( ) ; $ this -> validateDataMapStore ( ) ; $ this -> validateDataMetaTitleStore ( ) ; $ this -> validateDataMetaDescriptionStore ( ) ; $ this -> validateDataTranslationStore ( ) ; $ this -> validateDataThemeStore ( ) ; return ! $ this -> isError ( ) ; }
Validate "data" field
@return null|bool
Validate data field