diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index 8514448cc5ad5dc1a6bf7922417318d58eeb9fe3..b4c2567b72b228abc45103243e18ac46424f8609 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -411,9 +411,6 @@ public function shutdown() { * {@inheritdoc} */ public function getContainer() { - if ($this->containerNeedsDumping && !$this->dumpDrupalContainer($this->container, static::CONTAINER_BASE_CLASS)) { - $this->container->get('logger.factory')->get('DrupalKernel')->notice('Container cannot be written to disk'); - } return $this->container; } @@ -712,6 +709,12 @@ protected function initializeContainer($rebuild = FALSE) { $this->container->get('session_manager')->start(); } \Drupal::setContainer($this->container); + + // If needs dumping flag was set, dump the container. + if ($this->containerNeedsDumping && !$this->dumpDrupalContainer($this->container, static::CONTAINER_BASE_CLASS)) { + $this->container->get('logger.factory')->get('DrupalKernel')->notice('Container cannot be written to disk'); + } + return $this->container; } diff --git a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php index a7ac85a8abe28e81cf5b25e4a450d01c7b40d4ee..b79eb36f7b02737a9e95c0ec5ecd270c52363cfe 100644 --- a/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php +++ b/core/modules/system/src/Tests/DrupalKernel/DrupalKernelTest.php @@ -79,9 +79,7 @@ function testCompileDIC() { ); $request = Request::createFromGlobals(); - $this->getTestKernel($request, $modules_enabled) - // Trigger Kernel dump. - ->getContainer(); + $this->getTestKernel($request, $modules_enabled); // Instantiate it a second time and we should get the compiled Container // class. diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 5234f2c387c01160b074db01a633b6fbdb600064..bdbf54a05cabd24492a8377f35de7dc1f57dfd5b 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -46,9 +46,8 @@ protected function defineOptions() { $options['menu'] = array( 'contains' => array( 'type' => array('default' => 'none'), - // Do not translate menu and title as menu system will. - 'title' => array('default' => '', 'translatable' => FALSE), - 'description' => array('default' => '', 'translatable' => FALSE), + 'title' => array('default' => ''), + 'description' => array('default' => ''), 'weight' => array('default' => 0), 'menu_name' => array('default' => 'main'), 'parent' => array('default' => ''), @@ -58,11 +57,9 @@ protected function defineOptions() { $options['tab_options'] = array( 'contains' => array( 'type' => array('default' => 'none'), - // Do not translate menu and title as menu system will. - 'title' => array('default' => '', 'translatable' => FALSE), - 'description' => array('default' => '', 'translatable' => FALSE), + 'title' => array('default' => ''), + 'description' => array('default' => ''), 'weight' => array('default' => 0), - 'menu_name' => array('default' => 'main'), ), ); @@ -336,30 +333,6 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ), ), ); - // Only display the menu selector if Menu UI module is enabled. - if (\Drupal::moduleHandler()->moduleExists('menu_ui')) { - $form['tab_options']['menu_name'] = array( - '#title' => $this->t('Menu'), - '#type' => 'select', - '#options' => menu_ui_get_menus(), - '#default_value' => $tab_options['menu_name'], - '#description' => $this->t('Insert item into an available menu.'), - '#states' => array( - 'visible' => array( - ':input[name="tab_options[type]"]' => array('value' => 'normal'), - ), - ), - ); - } - else { - $form['tab_options']['menu_name'] = array( - '#type' => 'value', - '#value' => $tab_options['menu_name'], - ); - $form['tab_options']['markup'] = array( - '#markup' => $this->t('Menu selection requires the activation of Menu UI module.'), - ); - } $form['tab_options']['weight'] = array( '#suffix' => '</div>', '#title' => $this->t('Tab weight'),