protected function validatePathFile()
    {
        $field = 'path';
        $value = $this->getSubmitted($field);

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

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

        $label = $this->translation->text('File');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        if (!is_readable(gplcart_file_absolute($value))) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
protected function validatePathFile()
    {
        $field = 'path';
        $value = $this->getSubmitted($field);

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

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

        $label = $this->translation->text('File');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        if (!is_readable(gplcart_file_absolute($value))) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
protected function validatePathFile ( ) { $ field = 'path' ; $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isExcluded ( $ field ) || $ this -> isError ( ) ) { return null ; } if ( ! isset ( $ value ) && $ this -> isUpdating ( ) ) { return null ; } $ label = $ this -> translation -> text ( 'File' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } if ( ! is_readable ( gplcart_file_absolute ( $ value ) ) ) { $ this -> setErrorUnavailable ( $ field , $ label ) ; return false ; } return true ; }
Validates a file path
@return boolean|null
Validates a file path