OverridableDerivativeDiscoveryDecorator.php in Feeds 8.3
File
src/Plugin/Discovery/OverridableDerivativeDiscoveryDecorator.php
View source
<?php
namespace Drupal\feeds\Plugin\Discovery;
use Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator;
class OverridableDerivativeDiscoveryDecorator extends ContainerDerivativeDiscoveryDecorator {
public function getDefinitions() {
$plugin_definitions = $this->decorated
->getDefinitions();
$derivative_plugin_definitions = [];
foreach ($plugin_definitions as $plugin_id => $plugin_definition) {
if ($this
->getDeriver($plugin_id, $plugin_definition)) {
$derivative_plugin_definitions[$plugin_id] = $plugin_definition;
unset($plugin_definitions[$plugin_id]);
}
}
return $plugin_definitions + $this
->getDerivatives($derivative_plugin_definitions);
}
}