diff --git a/core/modules/book/book.module b/core/modules/book/book.module index a12ab01..095fe53 100644 --- a/core/modules/book/book.module +++ b/core/modules/book/book.module @@ -174,11 +174,6 @@ function book_menu() { 'type' => MENU_LOCAL_TASK, 'weight' => 100, ); - $items['admin/structure/book/%node'] = array( - 'title' => 'Re-order book pages and change titles', - 'route_name' => 'book_admin_edit', - 'type' => MENU_CALLBACK, - ); $items['book'] = array( 'title' => 'Books', 'route_name' => 'book_render', diff --git a/core/modules/book/book.routing.yml b/core/modules/book/book.routing.yml index 91e06ff..2aa7eea 100644 --- a/core/modules/book/book.routing.yml +++ b/core/modules/book/book.routing.yml @@ -33,6 +33,7 @@ book_admin_edit: pattern: '/admin/structure/book/{node}' defaults: _form: 'Drupal\book\Form\BookAdminEditForm' + _title: 'Re-order book pages and change titles' requirements: _book_outline_access: 'TRUE' node: \d+ diff --git a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php index d32e83a..86ede9f 100644 --- a/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php +++ b/core/modules/book/lib/Drupal/book/Form/BookAdminEditForm.php @@ -139,7 +139,7 @@ public function submitForm(array &$form, array &$form_state) { $node->log = $this->t('Title changed from %original to %current.', array('%original' => $node->title, '%current' => $values['title'])); $node->save(); - watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l(t('view'), 'node/' . $node->nid)); + watchdog('content', 'book: updated %title.', array('%title' => $node->label()), WATCHDOG_NOTICE, l($this->t('view'), 'node/' . $node->nid)); } } } @@ -150,7 +150,7 @@ public function submitForm(array &$form, array &$form_state) { $this->cache->delete($cid); } - drupal_set_message(t('Updated book %title.', array('%title' => $form['#node']->label()))); + drupal_set_message($this->t('Updated book %title.', array('%title' => $form['#node']->label()))); } /**