You are here

public function SplitFilter::filterDelete in Configuration Split 8

File

src/Plugin/ConfigFilter/SplitFilter.php, line 247

Class

SplitFilter
Provides a SplitFilter.

Namespace

Drupal\config_split\Plugin\ConfigFilter

Code

public function filterDelete($name, $delete) {
  if ($delete && $this->secondaryStorage && $this->secondaryStorage
    ->exists($name)) {

    // Call delete on the secondary storage anyway.
    $this->secondaryStorage
      ->delete($name);
  }
  if (in_array($name, $this
    ->getGraylist()) && !in_array($name, $this
    ->getBlacklist())) {

    // Do not delete graylisted config.
    return FALSE;
  }
  return $delete;
}