Version 1
[yaffs-website] / web / core / modules / aggregator / src / Form / FeedDeleteForm.php
diff --git a/web/core/modules/aggregator/src/Form/FeedDeleteForm.php b/web/core/modules/aggregator/src/Form/FeedDeleteForm.php
new file mode 100644 (file)
index 0000000..17a1798
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+
+namespace Drupal\aggregator\Form;
+
+use Drupal\Core\Entity\ContentEntityDeleteForm;
+use Drupal\Core\Url;
+
+/**
+ * Provides a form for deleting a feed.
+ */
+class FeedDeleteForm extends ContentEntityDeleteForm {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getCancelUrl() {
+    return new Url('aggregator.admin_overview');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getRedirectUrl() {
+    return $this->getCancelUrl();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getDeletionMessage() {
+    return $this->t('The feed %label has been deleted.', [
+      '%label' => $this->entity->label(),
+    ]);
+  }
+
+}