function WorkspaceProviderInterface::checkAccess
Checks access for a given workspace.
It is strongly recommended to inherit this method from the base provider class, and call the parent method before or after any custom logic.
Parameters
\Drupal\workspaces\WorkspaceInterface $workspace: The workspace for which to check access.
string $operation: The entity operation. Usually one of 'view', 'view label', 'update' or 'delete'.
\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 method overrides WorkspaceProviderInterface::checkAccess()
- WorkspaceProviderBase::checkAccess in core/
modules/ workspaces/ src/ Provider/ WorkspaceProviderBase.php - Checks access for a given workspace.
File
-
core/
modules/ workspaces/ src/ Provider/ WorkspaceProviderInterface.php, line 42
Class
- WorkspaceProviderInterface
- Provides the interface for workspace providers.
Namespace
Drupal\workspaces\ProviderCode
public function checkAccess(WorkspaceInterface $workspace, string $operation, AccountInterface $account) : AccessResultInterface;
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.