public function CoreExtensionFilter::filterWrite

8.0.x CoreExtensionFilter.php public CoreExtensionFilter::filterWrite($name, array $data, StorageInterface $storage)
master CoreExtensionFilter.php public CoreExtensionFilter::filterWrite($name, array $data, StorageInterface $storage)

Filter configuration data before it is written to storage.

Parameters

string $name: The name of a configuration object to save.

array $data: The configuration data to filter.

StorageInterface: The storage object that the filtered data will be written to. Provided in case the filter needs to read the existing configuration before writing it.

Return value

array $data The filtered data.

Overrides StorageFilter::filterWrite

File

lib/Drush/Config/CoreExtensionFilter.php, line 61
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

public function filterWrite($name, array $data, StorageInterface $storage) {
  if ($name != 'core.extension') {
    return $data;
  }
  $originalData = $storage->read($name);
  return $this->filterOutIgnored($data, $storage->read($name));
}