0, ScopeInterface::SCOPE_STORES => 'admin', ScopeInterface::SCOPE_WEBSITES => 'admin' ]; foreach ($entities as $scopeName => $key) { if (empty($data[$scopeName]) || (count($data[$scopeName]) == 1 && isset($data[$scopeName][$key]))) { return $errorMessage; } } return []; } }