You are here

public function DistroIgnoreFilter::filterListAll in Config Distro 8

File

modules/config_distro_ignore/src/Plugin/ConfigFilter/DistroIgnoreFilter.php, line 91

Class

DistroIgnoreFilter
Provides a ignore filter that resets config to the active one.

Namespace

Drupal\config_distro_ignore\Plugin\ConfigFilter

Code

public function filterListAll($prefix, array $data) {
  $active_names = $this
    ->getSourceStorage()
    ->listAll($prefix);

  // Filter out only ignored config names.
  $active_names = array_filter($active_names, [
    $this,
    'matchConfigName',
  ]);

  // Return the data with the active names which are ignored merged in.
  return array_unique(array_merge($data, $active_names));
}