You are here

public static function BlazyVideoFormatter::isApplicable in Blazy 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldFormatter/BlazyVideoFormatter.php \Drupal\blazy\Plugin\Field\FieldFormatter\BlazyVideoFormatter::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/BlazyVideoFormatter.php, line 125

Class

BlazyVideoFormatter
Plugin implementation of the 'Blazy Video' to get VEF videos.

Namespace

Drupal\blazy\Plugin\Field\FieldFormatter

Code

public static function isApplicable(FieldDefinitionInterface $field_definition) {
  return $field_definition
    ->getFieldStorageDefinition()
    ->getType() === 'video_embed_field';
}