Update to Drupal 8.2.0. For more information, see https://www.drupal.org/project/drupal/releases/8.2.0
This commit is contained in:
parent
2f563ab520
commit
f1c8716f57
1732 changed files with 52334 additions and 11780 deletions
|
@ -435,7 +435,7 @@ function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_stat
|
|||
}
|
||||
|
||||
/**
|
||||
* Submit handler for forms with menu options.
|
||||
* Validate handler for forms with menu options.
|
||||
*
|
||||
* @see menu_ui_form_node_type_form_alter()
|
||||
*/
|
||||
|
|
|
@ -173,12 +173,7 @@ class MenuForm extends EntityForm {
|
|||
*/
|
||||
public function save(array $form, FormStateInterface $form_state) {
|
||||
$menu = $this->entity;
|
||||
if (!$menu->isNew() || $menu->isLocked()) {
|
||||
$this->submitOverviewForm($form, $form_state);
|
||||
}
|
||||
|
||||
$status = $menu->save();
|
||||
|
||||
$edit_link = $this->entity->link($this->t('Edit'));
|
||||
if ($status == SAVED_UPDATED) {
|
||||
drupal_set_message($this->t('Menu %label has been updated.', array('%label' => $menu->label())));
|
||||
|
@ -192,6 +187,17 @@ class MenuForm extends EntityForm {
|
|||
$form_state->setRedirectUrl($this->entity->urlInfo('edit-form'));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function submitForm(array &$form, FormStateInterface $form_state) {
|
||||
parent::submitForm($form, $form_state);
|
||||
|
||||
if (!$this->entity->isNew() || $this->entity->isLocked()) {
|
||||
$this->submitOverviewForm($form, $form_state);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Form constructor to edit an entire menu tree at once.
|
||||
*
|
||||
|
|
|
@ -916,7 +916,7 @@ class MenuTest extends MenuWebTestBase {
|
|||
|
||||
// View tools menu customization page.
|
||||
$this->drupalGet('admin/structure/menu/manage/' . $this->menu->id());
|
||||
$this->assertResponse($response);
|
||||
$this->assertResponse($response);
|
||||
if ($response == 200) {
|
||||
$this->assertText(t('Tools'), 'Tools menu page was displayed');
|
||||
}
|
||||
|
|
Reference in a new issue