You are here

public function FieldStorageConfig::isMultiple in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::isMultiple()

Returns whether the field can contain multiple items.

Return value

bool TRUE if the field can contain multiple items, FALSE otherwise.

Overrides FieldStorageDefinitionInterface::isMultiple

File

core/modules/field/src/Entity/FieldStorageConfig.php, line 663
Contains \Drupal\field\Entity\FieldStorageConfig.

Class

FieldStorageConfig
Defines the Field storage configuration entity.

Namespace

Drupal\field\Entity

Code

public function isMultiple() {
  $cardinality = $this
    ->getCardinality();
  return $cardinality == FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED || $cardinality > 1;
}