function FieldStorageDefinitionInterface::getCardinality
Same name in other branches
- 9 core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getCardinality()
- 8.9.x core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php \Drupal\Core\Field\FieldStorageDefinitionInterface::getCardinality()
- 11.x 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\FieldCode
public function getCardinality();
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.