You are here

public function Context::validate in Drupal 10

Same name in this branch
  1. 10 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::validate()
  2. 10 core/lib/Drupal/Component/Plugin/Context/Context.php \Drupal\Component\Plugin\Context\Context::validate()
Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::validate()
  2. 9 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::validate()

Validates the set context value.

Return value

\Symfony\Component\Validator\ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded.

Overrides Context::validate

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 138

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

public function validate() {
  return $this
    ->getContextData()
    ->validate();
}