class ContentTranslationDeleteAccess implements AccessInterface (View source)

internal  This additional access checker only aims to prevent deletions in pending revisions until we are able to flag revision translations as deleted.
 

Access check for entity translation deletion.

Remove this in https://www.drupal.org/node/2945956.

Properties

protected EntityTypeManagerInterface $entityTypeManager

The entity type manager.

protected ContentTranslationManagerInterface $contentTranslationManager

The content translation manager.

Methods

__construct(EntityTypeManagerInterface $manager, ContentTranslationManagerInterface $content_translation_manager)

Constructs a ContentTranslationDeleteAccess object.

access(RouteMatchInterface $route_match, AccountInterface $account)

Checks access to translation deletion for the specified route match.

checkAccess(ContentEntityInterface $entity)

Checks access to translation deletion for the specified entity.

Details

__construct(EntityTypeManagerInterface $manager, ContentTranslationManagerInterface $content_translation_manager)

Constructs a ContentTranslationDeleteAccess object.

Parameters

EntityTypeManagerInterface $manager

The entity type manager.

ContentTranslationManagerInterface $content_translation_manager

The content translation manager.

AccessResultInterface access(RouteMatchInterface $route_match, AccountInterface $account)

Checks access to translation deletion for the specified route match.

Parameters

RouteMatchInterface $route_match

The parameterized route.

AccountInterface $account

The currently logged in account.

Return Value

AccessResultInterface

The access result.

AccessResultInterface checkAccess(ContentEntityInterface $entity)

Checks access to translation deletion for the specified entity.

Parameters

ContentEntityInterface $entity

The entity translation to be deleted.

Return Value

AccessResultInterface

The access result.