function ContextDefinitionInterface::getConstraint
Same name in other branches
- 8.9.x core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::getConstraint()
- 10 core/lib/Drupal/Component/Plugin/Context/ContextDefinitionInterface.php \Drupal\Component\Plugin\Context\ContextDefinitionInterface::getConstraint()
- 11.x 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\ContextCode
public function getConstraint($constraint_name);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.