You are here

public function ConfigFilterPluginManager::getFilterInstance in Config Filter 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/ConfigFilterPluginManager.php \Drupal\config_filter\Plugin\ConfigFilterPluginManager::getFilterInstance()

Get a configured filter instance by (plugin) id.

Parameters

string $id: The plugin id of the filter to load.

Return value

\Drupal\config_filter\Config\StorageFilterInterface|null The ConfigFilter.

Overrides ConfigFilterManagerInterface::getFilterInstance

File

src/Plugin/ConfigFilterPluginManager.php, line 51

Class

ConfigFilterPluginManager
Provides the Config filter plugin plugin manager.

Namespace

Drupal\config_filter\Plugin

Code

public function getFilterInstance($id) {
  $definitions = $this
    ->getDefinitions();
  if (array_key_exists($id, $definitions)) {
    return $this
      ->createInstance($id, $definitions[$id]);
  }
  return NULL;
}