You are here

protected function EditOwnContactInformationBlock::blockAccess in CRM Core 8.3

Same name and namespace in other branches
  1. 8 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

self::access()

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\Block

Code

protected function blockAccess(AccountInterface $account) {
  return AccessResult::allowedIfHasPermission($account, 'edit own contact information');
}