public function RecipientTypePluginCollection::getAll in Workbench Email 8
Same name and namespace in other branches
- 2.x src/RecipientTypePluginCollection.php \Drupal\workbench_email\RecipientTypePluginCollection::getAll()
Retrieves plugin definitions and creates an instance for each.
1 call to RecipientTypePluginCollection::getAll()
- RecipientTypePluginCollection::sort in src/
RecipientTypePluginCollection.php - Sorts all plugin instances in this collection.
File
- src/
RecipientTypePluginCollection.php, line 33
Class
- RecipientTypePluginCollection
- A collection of recipient types.
Namespace
Drupal\workbench_emailCode
public function getAll() {
// Retrieve all available behavior plugin definitions.
if (!$this->definitions) {
$this->definitions = $this->manager
->getDefinitions();
}
// Ensure that there is an instance of all available behavior plugins.
foreach ($this->definitions as $plugin_id => $definition) {
if (!isset($this->pluginInstances[$plugin_id])) {
$this
->initializePlugin($plugin_id);
}
}
return $this->pluginInstances;
}