Craft\Minimee_SettingsModel::validateCachePathAndUrl PHP Method

validateCachePathAndUrl() public method

Validate that cachePath and cacheUrl are both empty or non-empty.
public validateCachePathAndUrl ( ) : boolean | null
return boolean | null
    public function validateCachePathAndUrl()
    {
        $cachePath = $this->getCachePath();
        $cacheUrl = $this->getCacheUrl();
        $cachePathEmpty = empty($cachePath);
        $cacheUrlEmpty = empty($cacheUrl);
        if ($cachePathEmpty != $cacheUrlEmpty) {
            $this->addError('cachePath', Craft::t('Minimee\'s cachePath and cacheUrl must both either be empty or non-empty.'));
            $this->addError('cacheUrl', Craft::t('Minimee\'s cachePath and cacheUrl must both either be empty or non-empty.'));
        }
    }