simplify function handleValidationGroups
This commit is contained in:
parent
08e6ad00d4
commit
743ec61c44
1 changed files with 3 additions and 3 deletions
|
@ -172,10 +172,10 @@ class SettingsValidator extends AbstractValidator
|
|||
*/
|
||||
protected function handleValidationGroups(array &$validatorConfig)
|
||||
{
|
||||
if (isset($validatorConfig['options']['validationGroups']) && $validatorConfig['validator'] !== 'DigiComp.SettingValidator:Settings') {
|
||||
unset($validatorConfig['options']['validationGroups']);
|
||||
} elseif ($validatorConfig['validator'] === 'DigiComp.SettingValidator:Settings') {
|
||||
if ($validatorConfig['validator'] === 'DigiComp.SettingValidator:Settings') {
|
||||
$validatorConfig['options']['validationGroups'] = $this->options['validationGroups'];
|
||||
} elseif (isset($validatorConfig['options']['validationGroups'])) {
|
||||
unset($validatorConfig['options']['validationGroups']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue