W3cubDocs

/Drupal 8

public function FieldStorageDefinitionInterface::getConstraint

public FieldStorageDefinitionInterface::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/Field/FieldStorageDefinitionInterface.php, line 293

Class

FieldStorageDefinitionInterface
Defines an interface for entity field storage definitions.

Namespace

Drupal\Core\Field

Code

public function getConstraint($constraint_name);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Field!FieldStorageDefinitionInterface.php/function/FieldStorageDefinitionInterface::getConstraint/8.1.x