public static function FacebookEmbedFormatter::isApplicable in Media entity facebook 8
Same name and namespace in other branches
- 8.2 src/Plugin/Field/FieldFormatter/FacebookEmbedFormatter.php \Drupal\media_entity_facebook\Plugin\Field\FieldFormatter\FacebookEmbedFormatter::isApplicable()
- 3.x src/Plugin/Field/FieldFormatter/FacebookEmbedFormatter.php \Drupal\media_entity_facebook\Plugin\Field\FieldFormatter\FacebookEmbedFormatter::isApplicable()
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/ FacebookEmbedFormatter.php, line 46
Class
- FacebookEmbedFormatter
- Plugin implementation of the 'facebook_embed' formatter.
Namespace
Drupal\media_entity_facebook\Plugin\Field\FieldFormatterCode
public static function isApplicable(FieldDefinitionInterface $field_definition) {
return $field_definition
->getTargetEntityTypeId() === 'media';
}