function navigation_update_11001

Reorganizes the values for the logo settings.

File

core/modules/navigation/navigation.install, line 27

Code

function navigation_update_11001(array &$sandbox) : void {
  $settings = \Drupal::configFactory()->getEditable('navigation.settings');
  $settings->setData([
    'logo' => [
      'provider' => $settings->get('logo_provider'),
      'managed' => is_array($settings->get('logo_managed')) ? current($settings->get('logo_managed')) : $settings->get('logo_managed'),
      'max' => [
        'filesize' => $settings->get('logo_max_filesize'),
        'height' => $settings->get('logo_height') ?? 40,
        'width' => $settings->get('logo_width') ?? 40,
      ],
    ],
  ]);
  $settings->save(TRUE);
}

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