diff --git a/core/lib/Drupal/Core/Entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityFormController.php index 024a099..894af46 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityFormController.php @@ -118,7 +118,7 @@ protected function actionsElement(array $form, array &$form_state) { protected function actions(array $form, array &$form_state) { $entity = $this->getEntity($form_state); $entity_uri = $entity->uri(); - $actions = array( + $actions = array( // @todo Rename the action key from submit to save. 'submit' => array( '#value' => t('Save'), @@ -137,21 +137,21 @@ protected function actions(array $form, array &$form_state) { $entity_uri = $entity->uri(); if (!$entity->isNew()) { if (empty($entity_uri['path'])) { - // For entities without URI we have to use a submit button + // For entities without a URI we have to use a submit button. $actions['delete'] = array( - '#value' => t('Delete'), - '#submit' => array( - array($this, 'delete'), - ), + '#value' => t('Delete'), + '#submit' => array( + array($this, 'delete'), + ), ); } else { // For entities with a URI we provide a link to the delete form. - // @todo Is this the proper why to get the #href??? + // @todo Is this the proper way to get the #href? $actions['delete'] = array( - '#type' => 'link', - '#title' => t('Delete'), - '#href' => $entity_uri['path'] . '/delete', + '#type' => 'link', + '#title' => t('Delete'), + '#href' => $entity_uri['path'] . '/delete', ); } } diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php index 59d4ef5..f9818c6 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigEntityTest.php @@ -215,7 +215,8 @@ function testCRUDUI() { // Delete the configuration entity. $this->drupalGet("admin/structure/config_test/manage/$id/edit"); - // Delete link should occur twice. Once in tab, once in link. + // There should be two delete links - a tab and a link in the actions + // section. $this->assertLinkByHref("admin/structure/config_test/manage/$id/delete", 1); $this->drupalGet("admin/structure/config_test/manage/$id/delete"); $this->drupalPost(NULL, array(), 'Delete'); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index dd1373d..3ae349f 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -186,7 +186,8 @@ function testNodeTermCreationAndDeletion() { // Delete term 1 from the term edit page. $this->drupalGet('taxonomy/term/' . $term_objects['term1']->tid . '/edit'); - // Delete should appear once in tab and once in actions section. + // There should be two delete links - a tab and a link in the actions + // section. $this->assertLinkByHref('taxonomy/term/' . $term_objects['term1']->tid . '/delete', 1); $this->drupalGet('taxonomy/term/' . $term_objects['term1']->tid . '/delete'); $this->drupalPost(NULL, NULL, t('Delete'));