Skip to content

Commit

Permalink
Merge pull request #782 from UN-OCHA/berliner/error-80-wrong-column-h…
Browse files Browse the repository at this point in the history
…eading-in-logframes

Generate UUIDs instead of using the plugin id to prevent pollution of the static cache
  • Loading branch information
berliner authored Nov 6, 2023
2 parents 91b7cd2 + e9f5123 commit d63a5a5
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,20 @@ class AttachmentTable extends ConfigurationContainerItemPluginBase implements Co
*/
protected $configurationContainerItemManager;

/**
* The UUID service.
*
* @var \Drupal\Component\Uuid\UuidInterface
*/
protected $uuidService;

/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
$instance->configurationContainerItemManager = $container->get('plugin.manager.configuration_container_item_manager');
$instance->uuidService = $container->get('uuid');
return $instance;
}

Expand Down Expand Up @@ -472,7 +480,7 @@ public function getPrototype() {
* The plugin id.
*/
public function getUuid() {
return $this->getPluginId();
return $this->uuidService->generate();
}

}

0 comments on commit d63a5a5

Please sign in to comment.