You are here

public function GoogleAnalyticsCounterMessageManager::revokeAuthenticationMessage in Google Analytics Counter 8.3

Revoke Google Authentication Message.

Parameters

$build:

Return value

mixed

Overrides GoogleAnalyticsCounterMessageManagerInterface::revokeAuthenticationMessage

1 call to GoogleAnalyticsCounterMessageManager::revokeAuthenticationMessage()
GoogleAnalyticsCounterMessageManager::notAuthenticatedMessage in src/GoogleAnalyticsCounterMessageManager.php
Prints a warning message when not authenticated.

File

src/GoogleAnalyticsCounterMessageManager.php, line 115

Class

GoogleAnalyticsCounterMessageManager
Defines the Google Analytics Counter message manager.

Namespace

Drupal\google_analytics_counter

Code

public function revokeAuthenticationMessage($build) {
  $t_args = [
    ':href' => Url::fromRoute('google_analytics_counter.admin_auth_revoke', [], [
      'absolute' => TRUE,
    ])
      ->toString(),
    '@href' => 'revoking Google authentication',
  ];
  $build['revoke_authentication'] = [
    '#type' => 'html_tag',
    '#tag' => 'p',
    '#value' => $this
      ->t("If there's a problem with OAUTH authentication, try <a href=:href>@href</a>.", $t_args),
  ];
  return $build;
}