Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FieldConfigBase.php

function FieldConfigBase::setPropertyConstraints

Overrides FieldConfigInterface::setPropertyConstraints

File

core/lib/Drupal/Core/Field/FieldConfigBase.php, line 600

Class

FieldConfigBase
Base class for configurable field definitions.

Namespace

Drupal\Core\Field

Code

public function setPropertyConstraints($name, array $constraints) {
    $this->propertyConstraints[$name] = $constraints;
    // Reset the field item definition so the next time it is instantiated it
    // will receive the new constraints.
    $this->itemDefinition = NULL;
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal