Issue #3371646: Add option to have default setting for providing menu link
1 unresolved thread
Merge request reports
Activity
added 1 commit
- 217e66a6 - change title for new congfig menu_link_by_default
added 21 commits
Toggle commit listadded 1 commit
- 35a5ad35 - extend test coverage to also ceck menu link created when node is created
- core/modules/menu_ui/menu_ui.post_update.php 0 → 100644
5 * Post update functions for menu_ui. 6 */ 7 8 /** 9 * Adds link_by_default config in node.type.*.third_party.menu_ui settings. 10 */ 11 function menu_ui_post_update_add_link_by_default() { 12 $config_factory = \Drupal::configFactory(); 13 foreach ($config_factory->listAll('node.type.') as $node_type_config_name) { 14 $node_type_settings = $config_factory->getEditable($node_type_config_name); 15 $node_type_third_party_menu_ui_settings = $node_type_settings->get('third_party_settings.menu_ui'); 16 if (is_null($node_type_third_party_menu_ui_settings)) { 17 continue; 18 } 19 $node_type_third_party_menu_ui_settings['link_by_default'] = FALSE; 20 $node_type_settings->set('third_party_settings.menu_ui', $node_type_third_party_menu_ui_settings)->save(TRUE); - Comment on lines +8 to +20
Please register or sign in to reply