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'))));
|
||||
|
|
|
|||
Reference in a new issue