You are here

public function JumpMenuBlock::access in Better Jump Menus 8

Overrides \Drupal\block\BlockBase::access().

File

lib/Drupal/jump_menu/Plugin/Block/JumpMenuBlock.php, line 29
Contains \Drupal\jump_menu\Plugin\Block\JumpMenuBlock.

Class

JumpMenuBlock
Provides a Jump Menu block.

Namespace

Drupal\jump_menu\Plugin\Block

Code

public function access() {

  // @todo Clean up when http://drupal.org/node/1874498 lands.
  list(, $derivative) = explode(':', $this
    ->getPluginId());
  return $GLOBALS['user']
    ->isAuthenticated() || in_array($derivative, array(
    'main',
    'tools',
    'footer',
  ));
}