Commit 3cad69a3 authored by gbyte.co's avatar gbyte.co Committed by gbyte.co

Issue #2958710 by Prashant.c: Replace usages of the deprecated drupal_set_message() function

parent 1d71bbf2
......@@ -148,7 +148,7 @@ function simple_sitemap_schema() {
*/
function simple_sitemap_install() {
$base_url = $GLOBALS['base_url'];
drupal_set_message(t("You can now include content into the sitemap by visiting the corresponding entity type edit pages (e.g. <a href='@content_type_url'>node type edit pages</a>).<br/>Support for additional entity types and custom links can be added on <a href='@config_url'>the module's configuration pages</a>.", ['@content_type_url' => "$base_url/admin/structure/types", '@config_url' => "$base_url/admin/config/search/simplesitemap"]));
\Drupal::messenger()->addMessage(t("You can now include content into the sitemap by visiting the corresponding entity type edit pages (e.g. <a href='@content_type_url'>node type edit pages</a>).<br/>Support for additional entity types and custom links can be added on <a href='@config_url'>the module's configuration pages</a>.", ['@content_type_url' => "$base_url/admin/structure/types", '@config_url' => "$base_url/admin/config/search/simplesitemap"]));
}
/**
......
......@@ -244,7 +244,7 @@ function simple_sitemap_delete_bundle_config($entity_type_id, $bundle) {
if ($generator->getSetting('cron_generate')) {
$message .= ' Otherwise the sitemaps will be regenerated during a future cron run.';
}
drupal_set_message(t($message, ['@url' => $GLOBALS['base_url'] . '/admin/config/search/simplesitemap']));
\Drupal::messenger()->addMessage(t($message, ['@url' => $GLOBALS['base_url'] . '/admin/config/search/simplesitemap']));
}
}
......
......@@ -42,6 +42,7 @@ services:
public: true
arguments:
- '@logger.channel.simple_sitemap'
- '@messenger'
- '@current_user'
logger.channel.simple_sitemap:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment