public static function FlippingBookLinkFormatter::isApplicable in Flipping Book 8
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 FormatterBase::isApplicable
File
- src/
Plugin/ Field/ FieldFormatter/ FlippingBookLinkFormatter.php, line 124
Class
- FlippingBookLinkFormatter
- Plugin implementation of the 'flipping_book_link_formatter' formatter.
Namespace
Drupal\flipping_book\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return parent::isApplicable($field_definition) && $field_definition
->getTargetEntityTypeId() == 'flipping_book' && $field_definition
->getName() == 'file';
}