protected function TrumbaBlockBase::blockAccess in Trumba 8
Same name and namespace in other branches
- 2.x src/Plugin/Block/TrumbaBlockBase.php \Drupal\trumba\Plugin\Block\TrumbaBlockBase::blockAccess()
Checks to see if the block should be shown per permissions.
Parameters
\Drupal\Core\Session\AccountInterface $account:
Return value
\Drupal\Core\Access\AccessResult
Overrides BlockPluginTrait::blockAccess
File
- src/
Plugin/ Block/ TrumbaBlockBase.php, line 107
Class
- TrumbaBlockBase
- Defines a base block implementation that Trumba blocks plugins will extend.
Namespace
Drupal\trumba\Plugin\BlockCode
protected function blockAccess(AccountInterface $account) {
// The block is visible to those that have permission to view trumba
// spud blocks.
return AccessResult::allowedIfHasPermission($account, 'view trumba spud blocks');
}