You are here

protected function LimitedPluginDiscoveryDecorator::processDecoratedDefinitions in Plugin 8.2

Processes the definitions from the decorated discovery.

Any changes to the decorated definitions should be performed here.

Parameters

mixed[] $decorated_definitions: The decorated plugin definitions, keyed by plugin ID.

Return value

mixed[] The processed plugin definitions.

Overrides PluginDiscoveryDecorator::processDecoratedDefinitions

File

src/PluginDiscovery/LimitedPluginDiscoveryDecorator.php, line 21

Class

LimitedPluginDiscoveryDecorator
Provides a filtered plugin manager.

Namespace

Drupal\plugin\PluginDiscovery

Code

protected function processDecoratedDefinitions(array $decorated_definitions) {
  if (is_array($this->discoveryLimit)) {
    return array_intersect_key($decorated_definitions, array_flip($this->discoveryLimit));
  }
  else {
    return $decorated_definitions;
  }
}