public function DashboardSectionStorage::access in Dashboards with Layout Builder 8
Same name and namespace in other branches
- 2.0.x src/Plugin/SectionStorage/DashboardSectionStorage.php \Drupal\dashboards\Plugin\SectionStorage\DashboardSectionStorage::access()
Overrides \Drupal\Core\Access\AccessibleInterface::access().
Overrides SectionStorageInterface::access
1 method overrides DashboardSectionStorage::access()
- UserDashboardSectionStorage::access in src/
Plugin/ SectionStorage/ UserDashboardSectionStorage.php - Overrides \Drupal\Core\Access\AccessibleInterface::access().
File
- src/
Plugin/ SectionStorage/ DashboardSectionStorage.php, line 214
Class
- DashboardSectionStorage
- Dashboard section storage.
Namespace
Drupal\dashboards\Plugin\SectionStorageCode
public function access($operation, AccountInterface $account = NULL, $return_as_object = FALSE) {
if (!$account) {
$account = $this->account;
}
$result = AccessResult::allowedIfHasPermission($account, 'administer dashboards');
if ($return_as_object) {
return $result;
}
return $result
->isAllowed();
}