Issue #2102461 by InternetDevels, vijaycs85: Remove drupal_set_title() in menu module controllers.
parent
c63dd20949
commit
13ce7999af
|
@ -88,8 +88,6 @@ class MenuController implements ContainerInjectionInterface {
|
||||||
* Returns the menu link submission form.
|
* Returns the menu link submission form.
|
||||||
*/
|
*/
|
||||||
public function addLink(MenuInterface $menu) {
|
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(
|
$menu_link = $this->menuLinkStorage->create(array(
|
||||||
'mlid' => 0,
|
'mlid' => 0,
|
||||||
'plid' => 0,
|
'plid' => 0,
|
||||||
|
|
|
@ -70,7 +70,7 @@ class MenuFormController extends EntityFormController {
|
||||||
$menu = $this->entity;
|
$menu = $this->entity;
|
||||||
|
|
||||||
if ($this->operation == 'edit') {
|
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(
|
$form['label'] = array(
|
||||||
|
|
|
@ -24,6 +24,7 @@ menu.link_add:
|
||||||
path: '/admin/structure/menu/manage/{menu}/add'
|
path: '/admin/structure/menu/manage/{menu}/add'
|
||||||
defaults:
|
defaults:
|
||||||
_content: '\Drupal\menu\Controller\MenuController::addLink'
|
_content: '\Drupal\menu\Controller\MenuController::addLink'
|
||||||
|
_title: 'Add menu link'
|
||||||
requirements:
|
requirements:
|
||||||
_entity_create_access: 'menu_link'
|
_entity_create_access: 'menu_link'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue