Skip to content
Snippets Groups Projects
Unverified Commit fd9172a4 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #13959 from mlutfy/setMessageError

drupal#63 Drupal8: override setMessage(), because drupal_set_message is deprecated
parents e967abb5 61c48624
No related branches found
No related tags found
No related merge requests found
......@@ -628,6 +628,16 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
];
}
/**
* @inheritDoc
*/
public function setMessage($message) {
// CiviCRM sometimes includes markup in messages (ex: Event Cart)
// it needs to be rendered before being displayed.
$message = \Drupal\Core\Render\Markup::create($message);
\Drupal::messenger()->addMessage($message);
}
/**
* Drupal 8 has a different function to get current path, hence
* overriding the postURL function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment