class DomainPathListCheck in Domain Path 8
Custom access control handler for the domain path overview page.
Hierarchy
- class \Drupal\domain_path\Access\DomainPathListCheck
Expanded class hierarchy of DomainPathListCheck
File
- src/
Access/ DomainPathListCheck.php, line 11
Namespace
Drupal\domain_path\AccessView source
class DomainPathListCheck {
/**
* Handles route permissions on the domain path list page.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The account making the route request.
*
* @return \Drupal\Core\Access\AccessResult
*/
public static function viewDomainPathList(AccountInterface $account) {
if ($account
->hasPermission('administer domain paths') || $account
->hasPermission('view domain path list')) {
return AccessResult::allowed();
}
return AccessResult::forbidden();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DomainPathListCheck:: |
public static | function | Handles route permissions on the domain path list page. |