You are here

public function ContainerManager::displayMessage in GoogleTagManager 8

Displays a message to admin users.

Parameters

string $message: The message to display.

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

string $type: (optional) The message type. Defaults to 'status'.

3 calls to ContainerManager::displayMessage()
ContainerManager::createAssets in src/Entity/ContainerManager.php
Prepares directory for and saves snippet files for a container.
ContainerManager::deleteAssets in src/Entity/ContainerManager.php
Deletes snippet files for a container.
ContainerManager::saveSnippets in src/Entity/ContainerManager.php
Saves JS snippet files based on current settings.

File

src/Entity/ContainerManager.php, line 148

Class

ContainerManager
Defines the Google tag container manager.

Namespace

Drupal\google_tag\Entity

Code

public function displayMessage($message, array $args = [], $type = MessengerInterface::TYPE_STATUS) {
  global $_google_tag_display_message;
  if ($_google_tag_display_message) {
    $this->messenger
      ->addMessage($this
      ->t($message, $args), $type, TRUE);
  }
}