You are here

protected function LinkGeneratorBase::register_error in Simple XML sitemap 8

Logs and displays an error.

Parameters

$message: Untranslated message.

array $substitutions (optional): Substitutions (placeholder => substitution) which will replace placeholders with strings.

string $type (optional): Message type (status/warning/error).

2 calls to LinkGeneratorBase::register_error()
LinkGeneratorBase::get_entity_paths in src/LinkGeneratorBase.php
LinkGeneratorBase::get_multilang_urls_from_user_input in src/LinkGeneratorBase.php
Wrapper function for Drupal\Core\Url::fromUserInput. Returns url data for every language.

File

src/LinkGeneratorBase.php, line 92
Contains \Drupal\simplesitemap\LinkGeneratorBase.

Class

LinkGeneratorBase

Namespace

Drupal\simplesitemap

Code

protected function register_error($message, $substitutions = array(), $type = 'error') {
  $message = strtr(t($message), $substitutions);
  \Drupal::logger('simplesitemap')
    ->notice($message);
  drupal_set_message($message, $type);
}