use Drupal\Core\Action\ActionBase;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Session\AccountInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
/**
* The tempstore object.
*
- * @var \Drupal\user\SharedTempStore
+ * @var \Drupal\Core\TempStore\SharedTempStore
*/
protected $tempStore;
* The plugin ID for the plugin instance.
* @param mixed $plugin_definition
* The plugin implementation definition.
- * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+ * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
* The tempstore factory.
* @param AccountInterface $current_user
* Current user.
$configuration,
$plugin_id,
$plugin_definition,
- $container->get('user.private_tempstore'),
+ $container->get('tempstore.private'),
$container->get('current_user')
);
}
* {@inheritdoc}
*/
public function executeMultiple(array $entities) {
- /** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities */
+ /** @var \Drupal\Core\Entity\EntityInterface[] $entities */
$selection = [];
foreach ($entities as $entity) {
$langcode = $entity->language()->getId();
$selection[$entity->id()][$langcode] = $langcode;
}
- $this->tempStore->set($this->currentUser->id(), $selection);
+ $this->tempStore->set($this->currentUser->id() . ':' . $this->getPluginDefinition()['type'], $selection);
}
/**