DataDefinitionInterface::getConstraint

public DataDefinitionInterface::getConstraint($constraint_name)

Returns a validation constraint.

See \Drupal\Core\TypedData\DataDefinitionInterface::getConstraints() for details.

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.

See also

\Symfony\Component\Validator\Constraint

File

core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php, line 203

Class

DataDefinitionInterface
Interface for data definitions.

Namespace

Drupal\Core\TypedData

Code

public function getConstraint($constraint_name);
doc_Drupal
2016-10-29 09:00:11
Comments
Leave a Comment

Please login to continue.