public function FieldStorageConfig::setCardinality in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::setCardinality()
Sets the maximum number of items allowed for the field.
Parameters
int $cardinality: The cardinality value.
Return value
$this
Overrides FieldStorageConfigInterface::setCardinality
File
- core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 648
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function setCardinality($cardinality) {
$this->cardinality = $cardinality;
return $this;
}