Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / image / src / Form / ImageStyleEditForm.php
index e7cfd50c586cc5ed5488e728d03d24716bf26f4c..c166bb8fb03540ae015014c2485451b4eb81c671 100644 (file)
@@ -231,7 +231,7 @@ class ImageStyleEditForm extends ImageStyleFormBase {
       $effect_id = $this->entity->addImageEffect($effect);
       $this->entity->save();
       if (!empty($effect_id)) {
-        drupal_set_message($this->t('The image effect was successfully applied.'));
+        $this->messenger()->addStatus($this->t('The image effect was successfully applied.'));
       }
     }
   }
@@ -254,17 +254,7 @@ class ImageStyleEditForm extends ImageStyleFormBase {
    */
   public function save(array $form, FormStateInterface $form_state) {
     parent::save($form, $form_state);
-    drupal_set_message($this->t('Changes to the style have been saved.'));
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function actions(array $form, FormStateInterface $form_state) {
-    $actions = parent::actions($form, $form_state);
-    $actions['submit']['#value'] = $this->t('Update style');
-
-    return $actions;
+    $this->messenger()->addStatus($this->t('Changes to the style have been saved.'));
   }
 
   /**