Implements \Drupal\Component\Plugin\ContextAwarePluginInterface::valdidateContexts().
Overrides ContextAwarePluginInterface::validateContexts
public function validateContexts() {
  $violations = new ConstraintViolationList();
  // @todo: Implement symfony validator API to let the validator traverse
  // and set property paths accordingly.
  foreach ($this
    ->getContextDefinitions() as $name => $definition) {
    // Validate any set values.
    if (isset($this->context[$name])) {
      $violations
        ->addAll($this->context[$name]
        ->validate());
    }
    // @todo: If no value is set, make sure any mapping is validated.
  }
  return $violations;
}