diff --git a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php index a9fad94..887fcae 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityConfirmFormBase.php @@ -122,7 +122,7 @@ public function delete(array $form, FormStateInterface $form_state) {} * {@inheritdoc} */ public function validate(array $form, FormStateInterface $form_state) { - // Overwrite the default validation implementation as it is not necessary + // Override the default validation implementation as it is not necessary // nor possible to validate an entity in a confirmation form. } diff --git a/core/modules/shortcut/src/Entity/Shortcut.php b/core/modules/shortcut/src/Entity/Shortcut.php index d22c62b..f59f77d 100644 --- a/core/modules/shortcut/src/Entity/Shortcut.php +++ b/core/modules/shortcut/src/Entity/Shortcut.php @@ -65,7 +65,7 @@ public function getTitle() { * {@inheritdoc} */ public function setTitle($link_title) { - $this->link->set('title', $link_title); + $this->set('title', $link_title); return $this; } diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index 25f83a0..27202ba 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -72,6 +72,7 @@ public function testShortcutLinkAdd() { // Test the node routes with parameters. $entity->save(); $loaded = Shortcut::load($entity->id()); + $this->assertEqual($entity->link->uri, $loaded->link->uri); $this->assertEqual($entity->link->options, $loaded->link->options); } @@ -85,7 +86,7 @@ public function testShortcutLinkAdd() { ]; $this->drupalPostForm('admin/config/user-interface/shortcut/manage/' . $set->id() . '/add-link', $form_data, t('Save')); $this->assertResponse(200); - $this->assertRaw(String::format('The URL %url is not valid.', ['%url' => 'admin'])); + $this->assertRaw(t('The URL %url is not valid.', ['%url' => 'admin'])); $form_data = [ 'title[0][value]' => $title, diff --git a/core/modules/shortcut/src/Tests/ShortcutTestBase.php b/core/modules/shortcut/src/Tests/ShortcutTestBase.php index 7acd3fc..99a092b 100644 --- a/core/modules/shortcut/src/Tests/ShortcutTestBase.php +++ b/core/modules/shortcut/src/Tests/ShortcutTestBase.php @@ -67,7 +67,6 @@ protected function setUp() { 'weight' => -20, 'link' => array( 'uri' => 'node/add', - 'options' => [], ), )); $shortcut->save(); @@ -78,7 +77,6 @@ protected function setUp() { 'weight' => -19, 'link' => array( 'uri' => 'admin/content', - 'options' => [], ), )); $shortcut->save(); diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index b4bbec8..085b561 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -58,7 +58,7 @@ function standard_install() { 'shortcut_set' => 'default', 'title' => t('Add content'), 'weight' => -20, - 'link' => array('node/add'), + 'link' => array('uri' => 'node/add'), )); $shortcut->save(); @@ -66,7 +66,7 @@ function standard_install() { 'shortcut_set' => 'default', 'title' => t('All content'), 'weight' => -19, - 'link' => array('admin/content'), + 'link' => array('uri' => 'admin/content'), )); $shortcut->save();