protected function FieldLimiter::getCardinality in Field Limiter 8
Returns the cardinality setting of the field instance.
1 call to FieldLimiter::getCardinality()
- FieldLimiter::settingsForm in src/
Plugin/ Field/ FieldFormatter/ FieldLimiter.php
File
- src/
Plugin/ Field/ FieldFormatter/ FieldLimiter.php, line 37
Class
- FieldLimiter
- Plugin implementation of the 'field_limiter' formatter.
Namespace
Drupal\field_limiter\Plugin\Field\FieldFormatterCode
protected function getCardinality() {
if ($this->fieldDefinition instanceof FieldDefinitionInterface) {
return $this->fieldDefinition
->getFieldStorageDefinition()
->getCardinality();
}
return 0;
}