public function ConstraintManager::processDefinition in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Validation/ConstraintManager.php \Drupal\Core\Validation\ConstraintManager::processDefinition()
- 9 core/lib/Drupal/Core/Validation/ConstraintManager.php \Drupal\Core\Validation\ConstraintManager::processDefinition()
Performs extra processing on plugin definitions.
By default we add defaults for the type to the definition. If a type has additional processing logic they can do that by replacing or extending the method.
Overrides DefaultPluginManager::processDefinition
File
- core/
lib/ Drupal/ Core/ Validation/ ConstraintManager.php, line 113
Class
- ConstraintManager
- Constraint plugin manager.
Namespace
Drupal\Core\ValidationCode
public function processDefinition(&$definition, $plugin_id) {
// Make sure 'type' is set and either an array or FALSE.
if ($definition['type'] !== FALSE && !is_array($definition['type'])) {
$definition['type'] = [
$definition['type'],
];
}
}