Drupal 8  8.0.2
ContentTranslationManageAccessCheck Class Reference
Inheritance diagram for ContentTranslationManageAccessCheck:

Public Member Functions

 __construct (EntityManagerInterface $manager, LanguageManagerInterface $language_manager)
 
 access (Route $route, RouteMatchInterface $route_match, AccountInterface $account, $source=NULL, $target=NULL, $language=NULL, $entity_type_id=NULL)
 

Protected Attributes

 $entityManager
 
 $languageManager
 

Detailed Description

Access check for entity translation CRUD operation.

Constructor & Destructor Documentation

__construct ( EntityManagerInterface  $manager,
LanguageManagerInterface  $language_manager 
)

Constructs a ContentTranslationManageAccessCheck object.

Parameters
\Drupal\Core\Entity\EntityManagerInterface$managerThe entity type manager.
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.

References Drupal\entityManager(), and Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

access ( Route  $route,
RouteMatchInterface  $route_match,
AccountInterface  $account,
  $source = NULL,
  $target = NULL,
  $language = NULL,
  $entity_type_id = NULL 
)

Checks translation access for the entity and operation on the given route.

Parameters
\Symfony\Component\Routing\Route$routeThe route to check against.
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe parametrized route.
\Drupal\Core\Session\AccountInterface$accountThe currently logged in account.
string$source(optional) For a create operation, the language code of the source.
string$target(optional) For a create operation, the language code of the translation.
string$language(optional) For an update or delete operation, the language code of the translation being updated or deleted.
string$entity_type_id(optional) The entity type ID.
Returns
The access result.

References AccessResult\allowed(), AccessResult\allowedIf(), Drupal\entityManager(), AccessResult\forbidden(), RouteMatchInterface\getParameter(), AccountInterface\hasPermission(), Drupal\languageManager(), AccessResult\neutral(), and LanguageInterface\TYPE_CONTENT.

Here is the call graph for this function:


The documentation for this class was generated from the following file: