You are here

function system_update_8011 in Drupal 8

Add secondary local tasks block to Seven (fixes system_update_8005).

File

core/modules/system/system.install, line 2127
Install, update and uninstall functions for the system module.

Code

function system_update_8011() {
  $langcode = \Drupal::service('language_manager')
    ->getCurrentLanguage()
    ->getId();
  $theme_name = 'seven';
  $name = 'block.block.seven_secondary_local_tasks';
  $values = [
    'plugin' => 'local_tasks_block',
    'region' => 'pre_content',
    'id' => 'seven_secondary_local_tasks',
    'settings.label' => 'Secondary tabs',
    'settings.label_display' => 0,
    'settings.primary' => FALSE,
    'settings.secondary' => TRUE,
    'visibility' => [],
    'weight' => 0,
    'langcode' => $langcode,
  ];
  _system_update_create_block($name, $theme_name, $values);
}