You are here

protected function FieldFormatterEntityEmbedDisplayBase::isApplicableFieldFormatter in Entity Embed 8

Checks if the field formatter is applicable.

Return value

\Drupal\Core\Access\AccessResult Returns the access result.

2 calls to FieldFormatterEntityEmbedDisplayBase::isApplicableFieldFormatter()
EntityReferenceFieldFormatter::isApplicableFieldFormatter in src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php
Checks if the field formatter is applicable.
FieldFormatterEntityEmbedDisplayBase::access in src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php
Indicates whether this Entity Embed display can be used.
1 method overrides FieldFormatterEntityEmbedDisplayBase::isApplicableFieldFormatter()
EntityReferenceFieldFormatter::isApplicableFieldFormatter in src/Plugin/entity_embed/EntityEmbedDisplay/EntityReferenceFieldFormatter.php
Checks if the field formatter is applicable.

File

src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php, line 132

Class

FieldFormatterEntityEmbedDisplayBase
Base class for field formatter display plugins.

Namespace

Drupal\entity_embed\EntityEmbedDisplay

Code

protected function isApplicableFieldFormatter() {
  $definition = $this->formatterPluginManager
    ->getDefinition($this
    ->getFieldFormatterId());
  return AccessResult::allowedIf($definition['class']::isApplicable($this
    ->getFieldDefinition()));
}