<?php

/**
 * @file
 * Install, update and uninstall functions for the config_ignore module.
 */

/**
 * Enable the config_filter module.
 */
function config_ignore_update_8201() {
  \Drupal::getContainer()->get('module_installer')->install(['config_filter']);
}

/**
 * Remove index from configuration export.
 */
function config_ignore_update_8202() {
  $config = \Drupal::configFactory()->getEditable('config_ignore.settings');
  $ignored_config_entities = $config->get('ignored_config_entities') ?: [];
  $config->set('ignored_config_entities', array_values($ignored_config_entities));
  $config->save();
}
