public function PanelsStorageManager::access in Panels 8.3
Same name and namespace in other branches
- 8.4 src/Storage/PanelsStorageManager.php \Drupal\panels\Storage\PanelsStorageManager::access()
Checks if the user has access to underlying storage for a Panels display.
Parameters
string $storage_type: The storage type used by the storage plugin.
string $id: The id within the storage plugin for the requested Panels display.
string $op: The operation to perform (ie. create, read, update, delete).
\Drupal\Core\Session\AccountInterface|NULL $account: The user to check access for. If omitted, it'll check the curerntly logged in user.
Return value
\Drupal\Core\Access\AccessResultInterface The access result. If there is no such Panels display then deny access.
Overrides PanelsStorageManagerInterface::access
File
- src/
Storage/ PanelsStorageManager.php, line 96
Class
- PanelsStorageManager
- Panels storage manager service.
Namespace
Drupal\panels\StorageCode
public function access($storage_type, $id, $op, AccountInterface $account = NULL) {
if ($account === NULL) {
$account = $this->currentUser
->getAccount();
}
return $this
->getStorage($storage_type)
->access($id, $op, $account);
}