protected function EditOwnContactInformationBlock::blockAccess in CRM Core 8
Same name and namespace in other branches
- 8.3 modules/crm_core_user_sync/src/Plugin/Block/EditOwnContactInformationBlock.php \Drupal\crm_core_user_sync\Plugin\Block\EditOwnContactInformationBlock::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/
crm_core_user_sync/ src/ Plugin/ Block/ EditOwnContactInformationBlock.php, line 103
Class
- EditOwnContactInformationBlock
- Provides a 'Edit own contact information' block.
Namespace
Drupal\crm_core_user_sync\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIfHasPermission($account, 'edit own contact information');
}