protected function MatcherAccessControlHandler::checkAccess in CRM Core 8
Same name and namespace in other branches
- 8.3 modules/crm_core_match/src/Matcher/MatcherAccessControlHandler.php \Drupal\crm_core_match\Matcher\MatcherAccessControlHandler::checkAccess()
- 8.2 modules/crm_core_match/src/Matcher/MatcherAccessControlHandler.php \Drupal\crm_core_match\Matcher\MatcherAccessControlHandler::checkAccess()
Performs access checks.
This method is supposed to be overwritten by extending classes that do their own custom access checking.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: The entity for which to check access.
string $operation: The entity operation. Usually one of 'view', 'view label', 'update' or 'delete'.
\Drupal\Core\Session\AccountInterface $account: The user for which to check access.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
Overrides EntityAccessControlHandler::checkAccess
File
- modules/
crm_core_match/ src/ Matcher/ MatcherAccessControlHandler.php, line 17
Class
- MatcherAccessControlHandler
- Controls access to matchers.
Namespace
Drupal\crm_core_match\MatcherCode
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
/** @var \Drupal\crm_core_match\Matcher\MatcherConfigInterface $entity */
return parent::checkAccess($entity, $operation, $account);
// Deny delete access.
// ->andIf(AccessResult::allowedIf($operation != 'delete'));.
}