protected function CoreExtensionFilter::filterOutIgnored

8.0.x CoreExtensionFilter.php protected CoreExtensionFilter::filterOutIgnored($data, $originalData)
master CoreExtensionFilter.php protected CoreExtensionFilter::filterOutIgnored($data, $originalData)
2 calls to CoreExtensionFilter::filterOutIgnored()
CoreExtensionFilter::filterRead in lib/Drush/Config/CoreExtensionFilter.php
Filters configuration data after it is read from storage.
CoreExtensionFilter::filterWrite in lib/Drush/Config/CoreExtensionFilter.php
Filter configuration data before it is written to storage.

File

lib/Drush/Config/CoreExtensionFilter.php, line 69
Definition of Drush\Config\StorageFilter.

Namespace

Drush\Config

Class

CoreExtensionFilter
This filter adjusts the data going to and coming from the core.extension configuration object.

Code

protected function filterOutIgnored($data, $originalData) {
  foreach ($this->adjustments as $module) {
    if (is_array($originalData) && array_key_exists($module, $originalData['module'])) {
      $data['module'][$module] = $originalData['module'][$module];
    }
    else {
      unset($data['module'][$module]);
    }
  }
  return $data;

}