You are here

public function ContextDefinitionInterface::getConstraint in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::getConstraint()

Gets a validation constraint.

Parameters

string $constraint_name: The name of the constraint, i.e. its plugin id.

Return value

array A validation constraint definition which can be used for instantiating a \Symfony\Component\Validator\Constraint object.

1 method overrides ContextDefinitionInterface::getConstraint()
ContextDefinition::getConstraint in core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php
Gets a validation constraint.

File

core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php, line 174

Class

ContextDefinitionInterface
Interface used to define definition objects found in ContextInterface.

Namespace

Drupal\Component\Plugin\Context

Code

public function getConstraint($constraint_name);