You are here

protected function TrumbaBlockBase::blockAccess in Trumba 2.x

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

Class

TrumbaBlockBase
Defines a base block implementation that Trumba blocks plugins will extend.

Namespace

Drupal\trumba\Plugin\Block

Code

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');
}