public function DefaultLazyPluginCollection::__construct in Plug 7
Constructs a new DefaultLazyPluginCollection object.
Parameters
\Drupal\Component\Plugin\PluginManagerInterface $manager: The manager to be used for instantiating plugins.
array $configurations: (optional) An associative array containing the initial configuration for each plugin in the collection, keyed by plugin instance ID.
File
- lib/
Drupal/ Core/ Plugin/ DefaultLazyPluginCollection.php, line 64 - Contains \Drupal\Core\Plugin\DefaultLazyPluginCollection.
Class
- DefaultLazyPluginCollection
- Provides a default plugin collection for a plugin type.
Namespace
Drupal\Core\PluginCode
public function __construct(PluginManagerInterface $manager, array $configurations = array()) {
$this->manager = $manager;
$this->configurations = $configurations;
if (!empty($configurations)) {
$instance_ids = array_keys($configurations);
$this->instanceIDs = array_combine($instance_ids, $instance_ids);
// Store the original order of the instance IDs for export.
$this->originalOrder = $this->instanceIDs;
}
}