protected function SocialFooterPoweredByBlock::blockAccess in Open Social 10.3.x
Same name and namespace in other branches
- 10.0.x modules/social_features/social_footer/src/Plugin/Block/SocialFooterPoweredByBlock.php \Drupal\social_footer\Plugin\Block\SocialFooterPoweredByBlock::blockAccess()
- 10.1.x modules/social_features/social_footer/src/Plugin/Block/SocialFooterPoweredByBlock.php \Drupal\social_footer\Plugin\Block\SocialFooterPoweredByBlock::blockAccess()
- 10.2.x modules/social_features/social_footer/src/Plugin/Block/SocialFooterPoweredByBlock.php \Drupal\social_footer\Plugin\Block\SocialFooterPoweredByBlock::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_footer/ src/ Plugin/ Block/ SocialFooterPoweredByBlock.php, line 245
Class
- SocialFooterPoweredByBlock
- Provides a 'Powered by' block.
Namespace
Drupal\social_footer\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowedIf(!empty($this->configuration['text']['value']) || !empty($this->configuration['logo']));
}