public function PanelsStorageAccess::access in Panels 8.4
Same name and namespace in other branches
- 8.3 src/Storage/PanelsStorageAccess.php \Drupal\panels\Storage\PanelsStorageAccess::access()
Checks if the user has access to underlying storage for a Panels display.
Parameters
\Symfony\Component\Routing\Route $route: The route to check against.
\Drupal\Core\Routing\RouteMatchInterface $route_match: The parametrized route.
\Drupal\Core\Session\AccountInterface $account: The currently logged in account.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
File
- src/
Storage/ PanelsStorageAccess.php, line 45
Class
- PanelsStorageAccess
- Routing access for routes that depend on panels storage.
Namespace
Drupal\panels\StorageCode
public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account) {
$panels_storage_type = $route_match
->getParameter('panels_storage_type');
$panels_storage_id = $route_match
->getParameter('panels_storage_id');
$op = $route
->getRequirement('_panels_storage_access');
return $this->panelsStorage
->access($panels_storage_type, $panels_storage_id, $op, $account);
}