You are here

public function Container::displayMessage in GoogleTagManager 8

Displays a message.

Parameters

string $message: The message to display.

array $args: (optional) An associative array of replacements.

4 calls to Container::displayMessage()
Container::insertSnippet in src/Entity/Container.php
Determines whether to insert the snippet on the response.
Container::pathCheck in src/Entity/Container.php
Determines whether to insert the snippet based on the path settings.
Container::roleCheck in src/Entity/Container.php
Determines whether to insert the snippet based on the user role settings.
Container::statusCheck in src/Entity/Container.php
Determines whether to insert the snippet based on status code settings.

File

src/Entity/Container.php, line 503

Class

Container
Defines the container configuration entity.

Namespace

Drupal\google_tag\Entity

Code

public function displayMessage($message, array $args = []) {
  if (\Drupal::config('google_tag.settings')
    ->get('debug_output')) {
    \Drupal::service('messenger')
      ->addStatus($this
      ->t($message, $args), TRUE);
  }
}