protected function validateBasepathStore()
    {
        $field = 'basepath';

        if ($this->isExcluded($field) || $this->isError('domain')) {
            return null;
        }

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

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        if ($this->getSubmitted('default')) {
            $this->unsetSubmitted($field);
            return null; // Cannot update basepath of default store
        }

        $updating = $this->getUpdating();

        if (isset($updating['basepath'])
            && $updating['basepath'] === $value
            && $updating['domain'] === $this->getSubmitted('domain')) {
            return true;
        }

        if (preg_match('/^[a-z0-9-]{0,50}$/', $value) !== 1) {
            $this->setErrorInvalid($field, $this->translation->text('Path'));
            return false;
        }

        return true;
    }
protected function validateBasepathStore()
    {
        $field = 'basepath';

        if ($this->isExcluded($field) || $this->isError('domain')) {
            return null;
        }

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

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        if ($this->getSubmitted('default')) {
            $this->unsetSubmitted($field);
            return null; // Cannot update basepath of default store
        }

        $updating = $this->getUpdating();

        if (isset($updating['basepath'])
            && $updating['basepath'] === $value
            && $updating['domain'] === $this->getSubmitted('domain')) {
            return true;
        }

        if (preg_match('/^[a-z0-9-]{0,50}$/', $value) !== 1) {
            $this->setErrorInvalid($field, $this->translation->text('Path'));
            return false;
        }

        return true;
    }
protected function validateBasepathStore ( ) { $ field = 'basepath' ; if ( $ this -> isExcluded ( $ field ) || $ this -> isError ( 'domain' ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } if ( $ this -> getSubmitted ( 'default' ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; // Cannot update basepath of default store } $ updating = $ this -> getUpdating ( ) ; if ( isset ( $ updating [ 'basepath' ] ) && $ updating [ 'basepath' ] === $ value && $ updating [ 'domain' ] === $ this -> getSubmitted ( 'domain' ) ) { return true ; } if ( preg_match ( '/^[a-z0-9-]{0,50}$/' , $ value ) !== 1 ) { $ this -> setErrorInvalid ( $ field , $ this -> translation -> text ( 'Path' ) ) ; return false ; } return true ; }
Validates a store base path
@return boolean|null
Validates a store base path