protected function SocialEventInviteLocalActionsBlock::blockAccess in Open Social 10.0.x
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_invite/src/Plugin/Block/SocialEventInviteLocalActionsBlock.php \Drupal\social_event_invite\Plugin\Block\SocialEventInviteLocalActionsBlock::blockAccess()
- 10.3.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Block/SocialEventInviteLocalActionsBlock.php \Drupal\social_event_invite\Plugin\Block\SocialEventInviteLocalActionsBlock::blockAccess()
- 10.1.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Block/SocialEventInviteLocalActionsBlock.php \Drupal\social_event_invite\Plugin\Block\SocialEventInviteLocalActionsBlock::blockAccess()
- 10.2.x modules/social_features/social_event/modules/social_event_invite/src/Plugin/Block/SocialEventInviteLocalActionsBlock.php \Drupal\social_event_invite\Plugin\Block\SocialEventInviteLocalActionsBlock::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/
social_features/ social_event/ modules/ social_event_invite/ src/ Plugin/ Block/ SocialEventInviteLocalActionsBlock.php, line 80
Class
- SocialEventInviteLocalActionsBlock
- Provides a 'SocialEventInviteLocalActionsBlock' block.
Namespace
Drupal\social_event_invite\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
try {
return $this->accessHelper
->eventFeatureAccess();
} catch (InvalidPluginDefinitionException $e) {
return AccessResult::neutral();
} catch (PluginNotFoundException $e) {
return AccessResult::neutral();
}
}