public static function FlexsliderEntityFormatter::isApplicable in Flex Slider 8.2
Returns if the formatter can be used for the provided field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked.
Return value
bool TRUE if the formatter can be used, FALSE otherwise.
Overrides EntityReferenceEntityFormatter::isApplicable
File
- flexslider_fields/
src/ Plugin/ Field/ FieldFormatter/ FlexsliderEntityFormatter.php, line 97
Class
- FlexsliderEntityFormatter
- Plugin implementation of the 'flexslider_entity' formatter.
Namespace
Drupal\flexslider_fields\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
// @todo This could be shared with the other formatters.
// This formatter only applies to multi-valued entity reference fields.
return parent::isApplicable($field_definition) && $field_definition
->getFieldStorageDefinition()
->isMultiple();
}