public function FlagListItemAccess::customAccess in Flag Lists 4.0.x
Same name and namespace in other branches
- 8 src/Access/FlagListItemAccess.php \Drupal\flag_lists\Access\FlagListItemAccess::customAccess()
Checks access for a specific request.
Parameters
\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'FlagListItemAccess::customAccess'
File
- src/
Access/ FlagListItemAccess.php, line 24
Class
- FlagListItemAccess
- Access controller for the Flag list item entity.
Namespace
Drupal\flag_lists\AccessCode
public function customAccess(AccountInterface $account) {
// Only show the meny if the Migration module is installed.
return AccessResult::allowedIfHasPermission($account, 'administer flag lists')
->andIf(AccessResult::allowedIf(\Drupal::moduleHandler()
->moduleExists('migrate')));
}