Commit 13ce7999 authored by catch's avatar catch

Issue #2102461 by InternetDevels, vijaycs85: Remove drupal_set_title() in menu module controllers.

parent c63dd209
......@@ -88,8 +88,6 @@ public function getParentOptions(Request $request) {
* Returns the menu link submission form.
*/
public function addLink(MenuInterface $menu) {
// @todo Remove this when https://drupal.org/node/1981644 is in.
drupal_set_title(t('Add menu link'));
$menu_link = $this->menuLinkStorage->create(array(
'mlid' => 0,
'plid' => 0,
......
......@@ -70,7 +70,7 @@ public function form(array $form, array &$form_state) {
$menu = $this->entity;
if ($this->operation == 'edit') {
drupal_set_title(t('Edit menu %label', array('%label' => $menu->label())), PASS_THROUGH);
$form['#title'] = $this->t('Edit menu %label', array('%label' => $menu->label()));
}
$form['label'] = array(
......
......@@ -24,6 +24,7 @@ menu.link_add:
path: '/admin/structure/menu/manage/{menu}/add'
defaults:
_content: '\Drupal\menu\Controller\MenuController::addLink'
_title: 'Add menu link'
requirements:
_entity_create_access: 'menu_link'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment