public function CustomAccessCheck::access in Entity connect 8.2
A custom access check.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
Return value
\Drupal\Core\Access\AccessResult If the account has the permissions, isAllowed() will be TRUE, otherwise isNeutral() will be TRUE.
File
- src/
Access/ CustomAccessCheck.php, line 32
Class
- CustomAccessCheck
- Custom access checking class for entityconnect.
Namespace
Drupal\entityconnect\AccessCode
public function access(AccountInterface $account) {
// Check permissions and combine that with any custom access checking
// needed. Pass forward parameters from the route and/or request as needed.
return AccessResultAllowed::allowedIfHasPermissions($account, [
'entityconnect add button',
'entityconnect edit button',
], 'OR');
}