You are here

public function FieldStorageConfigInterface::setCardinality in Drupal 9

Same name and namespace in other branches
  1. 8 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);