Skip to content
Snippets Groups Projects
Commit b6c225b8 authored by Erik Seifert's avatar Erik Seifert
Browse files

Fix: Only override tmp store key

parent bfa7f37d
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ use Symfony\Component\Routing\RouteCollection;
use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
use Drupal\layout_builder\TempStoreIdentifierInterface;
use Drupal\Core\Cache\RefinableCacheableDependencyInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\layout_builder\Entity\SampleEntityGeneratorInterface;
......@@ -30,7 +31,7 @@ use Drupal\layout_builder\Entity\SampleEntityGeneratorInterface;
*
* @package Drupal\dashboards\Plugin\SectionStorage
*/
class UserDashboardSectionStorage extends DashboardSectionStorage {
class UserDashboardSectionStorage extends DashboardSectionStorage implements TempStoreIdentifierInterface {
/**
* UserDataInterface definition.
......@@ -101,7 +102,6 @@ class UserDashboardSectionStorage extends DashboardSectionStorage {
$contexts = [];
$id = !empty($value) ? $value : (!empty($defaults['dashboard']) ? $defaults['dashboard'] : NULL);
$id = explode('-', $id)[0];
/**
* @var \Drupal\dashboards\Entity\Dashboard $entity
*/
......@@ -150,8 +150,8 @@ class UserDashboardSectionStorage extends DashboardSectionStorage {
/**
* {@inheritdoc}
*/
public function getStorageId() {
return $this->getDashboard()->id() . '-' . $this->account->id();
public function getTempstoreKey() {
return $this->account->id();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment