class FlagListItemAccess in Flag Lists 8
Same name and namespace in other branches
- 4.0.x src/Access/FlagListItemAccess.php \Drupal\flag_lists\Access\FlagListItemAccess
Access controller for the Flag list item entity.
Hierarchy
- class \Drupal\flag_lists\Access\FlagListItemAccess
Expanded class hierarchy of FlagListItemAccess
See also
\Drupal\flag_lists\Entity\FlagListItem.
File
- src/
Access/ FlagListItemAccess.php, line 13
Namespace
Drupal\flag_lists\AccessView source
class FlagListItemAccess {
/**
* Checks access for a specific request.
*
* @param \Drupal\Core\Session\AccountInterface $account
* Run access checks for this account.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*/
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')));
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FlagListItemAccess:: |
public | function | Checks access for a specific request. |