You are here

public function FieldStorageDefinitionInterface::getCardinality in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getCardinality()

Returns the maximum number of items allowed for the field.

Possible values are positive integers or FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED.

Return value

int The field cardinality.

2 methods override FieldStorageDefinitionInterface::getCardinality()
BaseFieldDefinition::getCardinality in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Returns the maximum number of items allowed for the field.
FieldStorageConfig::getCardinality in core/modules/field/src/Entity/FieldStorageConfig.php
Returns the maximum number of items allowed for the field.

File

core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php, line 161

Class

FieldStorageDefinitionInterface
Defines an interface for entity field storage definitions.

Namespace

Drupal\Core\Field

Code

public function getCardinality();