diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php index 844c352..eee3b5f 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDeleteForm.php @@ -55,15 +55,6 @@ public function getCancelUrl() { /** * {@inheritdoc} */ - public function actions(array $form, FormStateInterface $form_state) { - $actions = parent::actions($form, $form_state); - $actions['submit']['#submit'] = array(array($this, 'delete')); - return $actions; - } - - /** - * {@inheritdoc} - */ public function submitForm(array &$form, FormStateInterface $form_state) { $this->entity->delete(); drupal_set_message($this->getDeletionMessage()); diff --git a/core/lib/Drupal/Core/Entity/EntityDeleteForm.php b/core/lib/Drupal/Core/Entity/EntityDeleteForm.php index 677f1a8..6062355 100644 --- a/core/lib/Drupal/Core/Entity/EntityDeleteForm.php +++ b/core/lib/Drupal/Core/Entity/EntityDeleteForm.php @@ -51,16 +51,7 @@ public function getDeletionMessage() { * {@inheritdoc} */ public function getCancelUrl() { - return new Url($this->entity->urlInfo()); - } - - /** - * {@inheritdoc} - */ - public function actions(array $form, FormStateInterface $form_state) { - $actions = parent::actions($form, $form_state); - $actions['submit']['#submit'] = array(array($this, 'delete')); - return $actions; + return new $this->entity->urlInfo(); } /** diff --git a/core/modules/action/src/Tests/ConfigurationTest.php b/core/modules/action/src/Tests/ConfigurationTest.php index 7f226dd..57b2525 100644 --- a/core/modules/action/src/Tests/ConfigurationTest.php +++ b/core/modules/action/src/Tests/ConfigurationTest.php @@ -81,7 +81,7 @@ function testActionConfiguration() { $this->assertResponse(200); // Make sure that the action was actually deleted. - $this->assertRaw(t('Action %action was deleted', array('%action' => $new_action_label)), 'Make sure that we get a delete confirmation message.'); + $this->assertRaw(t('The action %action has been deleted.', array('%action' => $new_action_label)), 'Make sure that we get a delete confirmation message.'); $this->drupalGet('admin/config/system/actions'); $this->assertResponse(200); $this->assertNoText($new_action_label, "Make sure the action label does not appear on the overview page after we've deleted the action.");