FieldStorageConfig::isMultiple

public 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 659

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);
}
doc_Drupal
2016-10-29 09:12:22
Comments
Leave a Comment

Please login to continue.