Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ContentTranslationDeleteAccess.php

function ContentTranslationDeleteAccess::access

Checks access to translation deletion for the specified route match.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The parameterized route.

\Drupal\Core\Session\AccountInterface $account: The currently logged in account.

Return value

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

File

core/modules/content_translation/src/Access/ContentTranslationDeleteAccess.php, line 65

Class

ContentTranslationDeleteAccess
Access check for entity translation deletion.

Namespace

Drupal\content_translation\Access

Code

public function access(RouteMatchInterface $route_match, AccountInterface $account) {
    $requirement = $route_match->getRouteObject()
        ->getRequirement('_access_content_translation_delete');
    $entity_type_id = current(explode('.', $requirement));
    $entity = $route_match->getParameter($entity_type_id);
    return $this->checkAccess($entity);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal