protected function WebformScheduledTask::getPluginCollection in Webform Scheduled Tasks 8.2
Get a plugin collection from a manager, type and settings.
Return value
\Drupal\Core\Plugin\DefaultSingleLazyPluginCollection|null A collection, or NULL if none is instantiable yet.
1 call to WebformScheduledTask::getPluginCollection()
- WebformScheduledTask::getPluginCollections in src/
Entity/ WebformScheduledTask.php - Gets the plugin collections used by this object.
File
- src/
Entity/ WebformScheduledTask.php, line 140
Class
- WebformScheduledTask
- Defines the webform schedule entity type.
Namespace
Drupal\webform_scheduled_tasks\EntityCode
protected function getPluginCollection($plugin_manager, $type, $settings) {
// Plugin collections must be stored as a single root property on the entity
// so that the serialization traits unset it correctly.
$key = 'plugin_collection_' . $type;
if (empty($this->{$key}) && !empty($type)) {
$this->{$key} = new DefaultSingleLazyPluginCollection(\Drupal::service($plugin_manager), $type, $settings);
}
return !empty($this->{$key}) ? $this->{$key} : NULL;
}