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