function system_update_8011

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

File

core/modules/system/system.install, line 2127

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.