Same name and namespace in other branches
  1. 8.9.x core/modules/filter/src/FilterPluginManager.php \Drupal\filter\FilterPluginManager
  2. 9 core/modules/filter/src/FilterPluginManager.php \Drupal\filter\FilterPluginManager

Manages text processing filters.

Hierarchy

Expanded class hierarchy of FilterPluginManager

See also

hook_filter_info_alter()

\Drupal\filter\Annotation\Filter

\Drupal\filter\Plugin\FilterInterface

\Drupal\filter\Plugin\FilterBase

Plugin API

1 string reference to 'FilterPluginManager'
filter.services.yml in core/modules/filter/filter.services.yml
core/modules/filter/filter.services.yml
1 service uses FilterPluginManager
plugin.manager.filter in core/modules/filter/filter.services.yml
Drupal\filter\FilterPluginManager

File

core/modules/filter/src/FilterPluginManager.php, line 20

Namespace

Drupal\filter
View source
class FilterPluginManager extends DefaultPluginManager implements FallbackPluginManagerInterface {

  /**
   * Constructs a FilterPluginManager object.
   *
   * @param \Traversable $namespaces
   *   An object that implements \Traversable which contains the root paths
   *   keyed by the corresponding namespace to look for plugin implementations.
   * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
   *   Cache backend instance to use.
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
   *   The module handler to invoke the alter hook with.
   */
  public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) {
    parent::__construct('Plugin/Filter', $namespaces, $module_handler, 'Drupal\\filter\\Plugin\\FilterInterface', Filter::class, 'Drupal\\filter\\Annotation\\Filter');
    $this
      ->alterInfo('filter_info');
    $this
      ->setCacheBackend($cache_backend, 'filter_plugins');
  }

  /**
   * {@inheritdoc}
   */
  public function getFallbackPluginId($plugin_id, array $configuration = []) {
    return 'filter_null';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FilterPluginManager::getFallbackPluginId public function Gets a fallback id for a missing plugin. Overrides FallbackPluginManagerInterface::getFallbackPluginId
FilterPluginManager::__construct public function Constructs a FilterPluginManager object.