projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updated to Drupal 8.6.4, which is PHP 7.3 friendly. Also updated HTMLaw library....
[yaffs-website]
/
web
/
core
/
modules
/
block_content
/
src
/
BlockContentForm.php
diff --git
a/web/core/modules/block_content/src/BlockContentForm.php
b/web/core/modules/block_content/src/BlockContentForm.php
index eefd4e9790847de64f8a84f35cd465ae435e7252..9df2a87d732ba519e3b97ef5fb5f53cc48a0eb5c 100644
(file)
--- a/
web/core/modules/block_content/src/BlockContentForm.php
+++ b/
web/core/modules/block_content/src/BlockContentForm.php
@@
-8,6
+8,8
@@
use Drupal\Core\Form\FormStateInterface;
/**
* Form handler for the custom block edit forms.
/**
* Form handler for the custom block edit forms.
+ *
+ * @internal
*/
class BlockContentForm extends ContentEntityForm {
*/
class BlockContentForm extends ContentEntityForm {
@@
-52,11
+54,11
@@
class BlockContentForm extends ContentEntityForm {
if ($insert) {
$logger->notice('@type: added %info.', $context);
if ($insert) {
$logger->notice('@type: added %info.', $context);
-
drupal_set_message
($this->t('@type %info has been created.', $t_args));
+
$this->messenger()->addStatus
($this->t('@type %info has been created.', $t_args));
}
else {
$logger->notice('@type: updated %info.', $context);
}
else {
$logger->notice('@type: updated %info.', $context);
-
drupal_set_message
($this->t('@type %info has been updated.', $t_args));
+
$this->messenger()->addStatus
($this->t('@type %info has been updated.', $t_args));
}
if ($block->id()) {
}
if ($block->id()) {
@@
-81,7
+83,7
@@
class BlockContentForm extends ContentEntityForm {
else {
// In the unlikely case something went wrong on save, the block will be
// rebuilt and block form redisplayed.
else {
// In the unlikely case something went wrong on save, the block will be
// rebuilt and block form redisplayed.
-
drupal_set_message($this->t('The block could not be saved.'), 'error'
);
+
$this->messenger()->addError($this->t('The block could not be saved.')
);
$form_state->setRebuild();
}
}
$form_state->setRebuild();
}
}