protected function WebformEntityListBuilder::isAdmin in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityListBuilder.php \Drupal\webform\WebformEntityListBuilder::isAdmin()
Is the current user a webform administrator.
Return value
bool TRUE if the current user has 'administer webform' or 'edit any webform' permission.
2 calls to WebformEntityListBuilder::isAdmin()
- WebformEntityListBuilder::getLimit in src/
WebformEntityListBuilder.php - Get number of entities to list per page.
- WebformEntityListBuilder::load in src/
WebformEntityListBuilder.php - Loads entities of this type from storage for listing.
File
- src/
WebformEntityListBuilder.php, line 594
Class
- WebformEntityListBuilder
- Defines a class to build a listing of webform entities.
Namespace
Drupal\webformCode
protected function isAdmin() {
$account = $this->currentUser;
return $account
->hasPermission('administer webform') || $account
->hasPermission('edit any webform') || $account
->hasPermission('view any webform submission');
}