/** * {@inheritdoc} */ protected function blockAccess(AccountInterface $account) { if ($this->getContextValue('user') instanceof UserInterface) { drupal_set_message('User context found.'); } return parent::blockAccess($account); }