public function ConstraintManager::processDefinition

Process definition callback for the ProcessDecorator.

Overrides PluginManagerBase::processDefinition

File

drupal/core/lib/Drupal/Core/Validation/ConstraintManager.php, line 116
Contains \Drupal\Core\Validation\ConstraintManager.

Class

ConstraintManager
Constraint plugin manager.

Namespace

Drupal\Core\Validation

Code

public function processDefinition(&$definition, $plugin_id) {

  // Make sure 'type' is set and either an array or FALSE.
  if (!isset($definition['type'])) {
    $definition['type'] = array();
  }
  elseif ($definition['type'] !== FALSE && !is_array($definition['type'])) {
    $definition['type'] = array(
      $definition['type'],
    );
  }
}