You are here

public function FieldFormatterEntityEmbedDisplayBase::access in Entity Embed 8

Indicates whether this Entity Embed display can be used.

This method allows base implementations to add general access restrictions that should apply to all extending Entity Embed display plugins.

Parameters

\Drupal\Core\Session\AccountInterface $account: (optional) The user for which to check access, or NULL to check access for the current user. Defaults to NULL.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

Overrides EntityEmbedDisplayBase::access

1 method overrides FieldFormatterEntityEmbedDisplayBase::access()
ImageFieldFormatter::access in src/Plugin/entity_embed/EntityEmbedDisplay/ImageFieldFormatter.php
Indicates whether this Entity Embed display can be used.

File

src/EntityEmbedDisplay/FieldFormatterEntityEmbedDisplayBase.php, line 122

Class

FieldFormatterEntityEmbedDisplayBase
Base class for field formatter display plugins.

Namespace

Drupal\entity_embed\EntityEmbedDisplay

Code

public function access(AccountInterface $account = NULL) {
  return parent::access($account)
    ->andIf($this
    ->isApplicableFieldFormatter());
}