You are here

protected function PhpUninstallValidator::removeFilterConfig in PHP 8

Deletes configuration.

1 call to PhpUninstallValidator::removeFilterConfig()
PhpUninstallValidator::validate in src/PhpUninstallValidator.php
Determines the reasons a module can not be uninstalled.

File

src/PhpUninstallValidator.php, line 26

Class

PhpUninstallValidator
Remove filter preventing Php uninstall.

Namespace

Drupal\php

Code

protected function removeFilterConfig() {
  $php_filter = \Drupal::configFactory()
    ->getEditable('filter.format.php_code');
  $php_filter
    ->delete();

  // Clear cache.
  drupal_flush_all_caches();
}