scopeConfig->isSetFlag(self::XML_PATH_ENABLED, ScopeInterface::SCOPE_STORE); } /** * @return string[] */ public function getAllowedExtensions(): array { $value = strtolower((string) $this->scopeConfig->getValue(self::XML_PATH_ALLOWED_EXTENSIONS)); $extensions = preg_split('/[\s,]+/', $value, -1, PREG_SPLIT_NO_EMPTY) ?: []; return array_values(array_intersect( array_unique($extensions), FilePolicy::getSupportedExtensions() )); } public function getMaximumFileSizeBytes(): int { $megabytes = (float) $this->scopeConfig->getValue(self::XML_PATH_MAX_FILE_SIZE); return (int) round($megabytes * 1024 * 1024); } public function getUploadPath(): string { return trim((string) $this->scopeConfig->getValue(self::XML_PATH_UPLOAD_PATH), '/'); } }