You are here

function system_update_8011 in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/system.install \system_update_8011()

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

File

core/modules/system/system.install, line 1791
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);
}