Update to Drupal 8.1.2. For more information, see https://www.drupal.org/project/drupal/releases/8.1.2
This commit is contained in:
parent
9eae24d844
commit
28556d630e
1322 changed files with 6699 additions and 2064 deletions
|
@ -257,7 +257,7 @@ function menu_ui_get_menu_link_defaults(NodeInterface $node) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_BASE_FORM_ID_alter() for node_form.
|
||||
* Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
|
||||
*
|
||||
* Adds menu item fields to the node form.
|
||||
*
|
||||
|
@ -371,7 +371,7 @@ function menu_ui_form_node_form_submit($form, FormStateInterface $form_state) {
|
|||
$entity->delete();
|
||||
}
|
||||
}
|
||||
elseif (trim($values['title'])) {
|
||||
elseif (trim($values['title'])) {
|
||||
// Decompose the selected menu parent option into 'menu_name' and 'parent',
|
||||
// if the form used the default parent selection widget.
|
||||
if (!empty($values['menu_parent'])) {
|
||||
|
@ -385,12 +385,12 @@ function menu_ui_form_node_form_submit($form, FormStateInterface $form_state) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
* Implements hook_form_FORM_ID_alter() for \Drupal\node\NodeTypeForm.
|
||||
*
|
||||
* Adds menu options to the node type form.
|
||||
*
|
||||
* @see NodeTypeForm::form().
|
||||
* @see menu_ui_form_node_type_form_submit().
|
||||
* @see NodeTypeForm::form()
|
||||
* @see menu_ui_form_node_type_form_submit()
|
||||
*/
|
||||
function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_state) {
|
||||
/** @var \Drupal\Core\Menu\MenuParentFormSelectorInterface $menu_parent_selector */
|
||||
|
@ -437,7 +437,7 @@ function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_stat
|
|||
/**
|
||||
* Submit handler for forms with menu options.
|
||||
*
|
||||
* @see menu_ui_form_node_type_form_alter().
|
||||
* @see menu_ui_form_node_type_form_alter()
|
||||
*/
|
||||
function menu_ui_form_node_type_form_validate(&$form, FormStateInterface $form_state) {
|
||||
$available_menus = array_filter($form_state->getValue('menu_options'));
|
||||
|
@ -457,7 +457,7 @@ function menu_ui_form_node_type_form_validate(&$form, FormStateInterface $form_s
|
|||
/**
|
||||
* Entity builder for the node type form with menu options.
|
||||
*
|
||||
* @see menu_ui_form_node_type_form_alter().
|
||||
* @see menu_ui_form_node_type_form_alter()
|
||||
*/
|
||||
function menu_ui_form_node_type_form_builder($entity_type, NodeTypeInterface $type, &$form, FormStateInterface $form_state) {
|
||||
$type->setThirdPartySetting('menu_ui', 'available_menus', array_values(array_filter($form_state->getValue('menu_options'))));
|
||||
|
|
|
@ -92,4 +92,5 @@ class MenuDeleteForm extends EntityDeleteForm {
|
|||
|
||||
parent::submitForm($form, $form_state);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -63,4 +63,5 @@ class MenuLinkReorderTest extends WebTestBase {
|
|||
$this->assertLink('Home');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -229,10 +229,10 @@ class MenuNodeTest extends WebTestBase {
|
|||
));
|
||||
$child_item->save();
|
||||
// Edit the first node.
|
||||
$this->drupalGet('node/'. $node->id() .'/edit');
|
||||
$this->drupalGet('node/' . $node->id() . '/edit');
|
||||
// Assert that it is not possible to set the parent of the first node to itself or the second node.
|
||||
$this->assertNoOption('edit-menu-menu-parent', 'tools:'. $item->getPluginId());
|
||||
$this->assertNoOption('edit-menu-menu-parent', 'tools:'. $child_item->getPluginId());
|
||||
$this->assertNoOption('edit-menu-menu-parent', 'tools:' . $item->getPluginId());
|
||||
$this->assertNoOption('edit-menu-menu-parent', 'tools:' . $child_item->getPluginId());
|
||||
// Assert that unallowed Administration menu is not available in options.
|
||||
$this->assertNoOption('edit-menu-menu-parent', 'admin:');
|
||||
}
|
||||
|
@ -337,4 +337,5 @@ class MenuNodeTest extends WebTestBase {
|
|||
$this->drupalGet($url);
|
||||
$this->assertFieldById('edit-menu-title', $translated_node_title);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -571,7 +571,7 @@ class MenuTest extends MenuWebTestBase {
|
|||
|
||||
$id = 'block:block=' . $block->id() . ':langcode=en|menu:menu=' . $custom_menu->id() . ':langcode=en';
|
||||
// @see \Drupal\contextual\Tests\ContextualDynamicContextTest:assertContextualLinkPlaceHolder()
|
||||
$this->assertRaw('<div data-contextual-id="'. $id . '"></div>', format_string('Contextual link placeholder with id @id exists.', array('@id' => $id)));
|
||||
$this->assertRaw('<div data-contextual-id="' . $id . '"></div>', format_string('Contextual link placeholder with id @id exists.', array('@id' => $id)));
|
||||
|
||||
// Get server-rendered contextual links.
|
||||
// @see \Drupal\contextual\Tests\ContextualDynamicContextTest:renderContextualLinks()
|
||||
|
|
Reference in a new issue