projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0563bca
)
Drupal8: override setMessage(), because drupal_set_message is deprecated.
author
Mathieu Lutfy
<mathieu@symbiotic.coop>
Thu, 4 Apr 2019 20:48:10 +0000
(16:48 -0400)
committer
Mathieu Lutfy
<mathieu@bidon.ca>
Thu, 4 Apr 2019 20:48:10 +0000
(16:48 -0400)
CRM/Utils/System/Drupal8.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Utils/System/Drupal8.php
b/CRM/Utils/System/Drupal8.php
index f96bb102e86d0b2d9d64c9ed05eb66b3243148b3..e5363df9bc5995df782948c53a47d320056ff7b7 100644
(file)
--- 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