You are here

public function GroupContentEnablerInterface::checkAccess in Group 8

Checks access to an operation on a given group content entity.

Use \Drupal\group\Plugin\GroupContentEnablerInterface::createAccess() to check access to create a group content entity.

Parameters

\Drupal\group\Entity\GroupContentInterface $group_content: The group content for which to check access.

string $operation: The operation access should be checked for. Usually one of "view", "update" or "delete".

\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.

Return value

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

Deprecated

in Group 1.0, will be removed before Group 2.0. Retrieve the access handler from the plugin manager instead.

1 method overrides GroupContentEnablerInterface::checkAccess()
GroupContentEnablerBase::checkAccess in src/Plugin/GroupContentEnablerBase.php
Checks access to an operation on a given group content entity.

File

src/Plugin/GroupContentEnablerInterface.php, line 304

Class

GroupContentEnablerInterface
Defines an interface for pluggable GroupContentEnabler back-ends.

Namespace

Drupal\group\Plugin

Code

public function checkAccess(GroupContentInterface $group_content, $operation, AccountInterface $account);