protected function BlockBase::blockAccess in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Block/BlockBase.php \Drupal\Core\Block\BlockBase::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.
See also
1 call to BlockBase::blockAccess()
- BlockBase::access in core/
lib/ Drupal/ Core/ Block/ BlockBase.php - Indicates whether the block should be shown.
12 methods override BlockBase::blockAccess()
- AggregatorFeedBlock::blockAccess in core/
modules/ aggregator/ src/ Plugin/ Block/ AggregatorFeedBlock.php - Indicates whether the block should be shown.
- BlockContentBlock::blockAccess in core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php - Indicates whether the block should be shown.
- ForumBlockBase::blockAccess in core/
modules/ forum/ src/ Plugin/ Block/ ForumBlockBase.php - Indicates whether the block should be shown.
- LanguageBlock::blockAccess in core/
modules/ language/ src/ Plugin/ Block/ LanguageBlock.php - Indicates whether the block should be shown.
- SearchBlock::blockAccess in core/
modules/ search/ src/ Plugin/ Block/ SearchBlock.php - Indicates whether the block should be shown.
File
- core/
lib/ Drupal/ Core/ Block/ BlockBase.php, line 140 - Contains \Drupal\Core\Block\BlockBase.
Class
- BlockBase
- Defines a base block implementation that most blocks plugins will extend.
Namespace
Drupal\Core\BlockCode
protected function blockAccess(AccountInterface $account) {
// By default, the block is visible.
return AccessResult::allowed();
}