function FieldStorageConfigInterface::setCardinality

Same name in other branches
  1. 9 core/modules/field/src/FieldStorageConfigInterface.php \Drupal\field\FieldStorageConfigInterface::setCardinality()
  2. 8.9.x core/modules/field/src/FieldStorageConfigInterface.php \Drupal\field\FieldStorageConfigInterface::setCardinality()
  3. 10 core/modules/field/src/FieldStorageConfigInterface.php \Drupal\field\FieldStorageConfigInterface::setCardinality()

Sets the maximum number of items allowed for the field.

Parameters

int $cardinality: The cardinality value.

Return value

$this

1 method overrides FieldStorageConfigInterface::setCardinality()
FieldStorageConfig::setCardinality in core/modules/field/src/Entity/FieldStorageConfig.php
Sets the maximum number of items allowed for the field.

File

core/modules/field/src/FieldStorageConfigInterface.php, line 71

Class

FieldStorageConfigInterface
Provides an interface defining a field storage entity.

Namespace

Drupal\field

Code

public function setCardinality($cardinality);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.