X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FSystem%2FDrupal8.php;h=e5363df9bc5995df782948c53a47d320056ff7b7;hb=61c4862417246c86e73f5c98594e5dcd49813d78;hp=f96bb102e86d0b2d9d64c9ed05eb66b3243148b3;hpb=0563bca39f9bab15f9465ffc3ecf62a3e71da50d;p=civicrm-core.git diff --git a/CRM/Utils/System/Drupal8.php b/CRM/Utils/System/Drupal8.php index f96bb102e8..e5363df9bc 100644 --- a/CRM/Utils/System/Drupal8.php +++ b/CRM/Utils/System/Drupal8.php @@ -634,6 +634,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