protected function AddDataPolicyRevision::blockAccess in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.2 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.3 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.4 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.6 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.7 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 8.8 modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 10.0.x modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
- 10.1.x modules/custom/social_gdpr/src/Plugin/Block/AddDataPolicyRevision.php \Drupal\social_gdpr\Plugin\Block\AddDataPolicyRevision::blockAccess()
Indicates whether the block should be shown.
Blocks with specific access checking should override this method rather than access(), in order to avoid repeating the handling of the $return_as_object argument.
Parameters
\Drupal\Core\Session\AccountInterface $account: The user session for which to check access.
Return value
\Drupal\Core\Access\AccessResult The access result.
Overrides BlockPluginTrait::blockAccess
See also
File
- modules/
custom/ social_gdpr/ src/ Plugin/ Block/ AddDataPolicyRevision.php, line 46
Class
- AddDataPolicyRevision
- Provides a 'AddDataPolicyRevision' block.
Namespace
Drupal\social_gdpr\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'edit data policy');
}