FilterUninstallValidator::getFilterDefinitionsByProvider

protected FilterUninstallValidator::getFilterDefinitionsByProvider($provider)

Returns all filter definitions that are provided by the specified provider.

Parameters

string $provider: The provider of the filters.

Return value

array The filter definitions for the specified provider.

File

core/modules/filter/src/FilterUninstallValidator.php, line 82

Class

FilterUninstallValidator
Prevents uninstallation of modules providing used filter plugins.

Namespace

Drupal\filter

Code

protected function getFilterDefinitionsByProvider($provider) {
  return array_filter($this->filterManager->getDefinitions(), function($definition) use ($provider) {
    return $definition['provider'] == $provider;
  });
}
doc_Drupal
2016-10-29 09:14:53
Comments
Leave a Comment

Please login to continue.