Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / content_moderation / src / Form / EntityModerationForm.php
index 98f6fdf2b9a09f47d997177efd2c143d98ebcebc..34af4ea50345c06f397024ce0f3ff3cacb5f6453 100644 (file)
@@ -128,6 +128,7 @@ class EntityModerationForm extends FormBase {
     ];
 
     $form['#theme'] = ['entity_moderation_form'];
+    $form['#attached']['library'][] = 'content_moderation/content_moderation';
 
     return $form;
   }
@@ -153,7 +154,7 @@ class EntityModerationForm extends FormBase {
     }
     $entity->save();
 
-    drupal_set_message($this->t('The moderation state has been updated.'));
+    $this->messenger()->addStatus($this->t('The moderation state has been updated.'));
 
     $new_state = $this->moderationInfo->getWorkflowForEntity($entity)->getTypePlugin()->getState($new_state);
     // The page we're on likely won't be visible if we just set the entity to