public function EntityTyp8b7c:f320:99b9:690f:4595:cd17:293a:c069setConstraints public EntityTyp8b7c:f320:99b9:690f:4595:cd17:293a:c069setConstraints(array $constraints) Sets the array of validation constraints for the FieldItemList. NOTE: This will overwrite any previously set constraints. In most cases ContentEntityTypeInter8b7c:f320:99b9:690f:4595:cd17:293a:c069addConstraint() should be used instead. See \Drupal\Core\TypedData\DataDefinitionInter8b7c:f320:99b9:690f:4595:cd17:293a:c069getConstraints() for details on how constraints are defined. Parameters  array $constraints: An array of validation constraint definitions, keyed by constraint name. Each constraint definition can be used for instantiating \Symfony\Component\Validator\Constraint objects. Return value  $this Overrides EntityTypeInter8b7c:f320:99b9:690f:4595:cd17:293a:c069setConstraints See also  \Symfony\Component\Validator\Constraint File
 core/lib/Drupal/Core/Entity/EntityType.php, line 845  Class
 
EntityType  Provides an implementation of an entity type and its metadata.  Namespace Drupal\Core\Entity Code public function setConstraints(array $constraints) {
  $this->constraints = $constraints;
  return $this;
}


    
{'path': 'public/docs/drupal~8/core-lib-drupal-core-entity-entitytype.php/function/entitytype-setconstraints/8.1.x.html', 'source': 'DevDocs.IO'}