Commit b9dd6bd4 authored by Berdir's avatar Berdir Committed by joelpittet

Issue #2936263 by stevekeiretsu, jian he, Berdir, joelpittet, TECreasey,...

Issue #2936263 by stevekeiretsu, jian he, Berdir, joelpittet, TECreasey, newme154: User's temp stores has been moved to core for 8.5.x
parent 2e83e7a7
......@@ -14,7 +14,7 @@ services:
arguments: ['@form_builder', '@event_dispatcher', '@renderer']
ctools.paramconverter.tempstore:
class: Drupal\ctools\ParamConverter\TempstoreConverter
arguments: ['@user.shared_tempstore', '@entity_type.manager']
arguments: ['@tempstore.shared', '@entity_type.manager']
tags:
- { name: paramconverter }
ctools.typed_data.resolver:
......@@ -22,7 +22,7 @@ services:
arguments: ['@typed_data_manager', '@string_translation']
ctools.access:
class: Drupal\ctools\Access\TempstoreAccess
arguments: ['@user.shared_tempstore']
arguments: ['@tempstore.shared']
tags:
- { name: access_check, applies_to: _ctools_access }
plugin.manager.ctools.relationship:
......@@ -33,6 +33,6 @@ services:
arguments: ['@entity.repository']
ctools.serializable.tempstore.factory:
class: Drupal\ctools\SerializableTempstoreFactory
arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%user.tempstore.expire%', '@current_user']
arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%tempstore.expire%', '@current_user']
tags:
- { name: backend_overridable }
......@@ -7,7 +7,7 @@ use Drupal\Core\Routing\Access\AccessInterface as CoreAccessInterface;
use Drupal\Core\Routing\RouteMatch;
use Drupal\Core\Session\AccountInterface;
use Drupal\ctools\Access\AccessInterface as CToolsAccessInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\Routing\Route;
class TempstoreAccess implements CoreAccessInterface {
......@@ -15,7 +15,7 @@ class TempstoreAccess implements CoreAccessInterface {
/**
* The shared tempstore factory.
*
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -24,7 +24,7 @@ class WizardFormController extends FormController {
/**
* Tempstore Factory for keeping track of values in each step of the wizard.
*
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -11,7 +11,7 @@ use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContextAwarePluginInterface;
use Drupal\ctools\ConstraintConditionInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ConditionConfigure extends FormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -8,13 +8,13 @@ use Drupal\Core\Form\ConfirmFormHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\ctools\ConstraintConditionInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ConditionDelete extends ConfirmFormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -12,14 +12,14 @@ use Drupal\Core\Plugin\Context\Context;
use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\Plugin\Context\ContextInterface;
use Drupal\Core\Url;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
abstract class ContextConfigure extends FormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -4,7 +4,7 @@ namespace Drupal\ctools\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Form\ConfirmFormBase;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -13,7 +13,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ContextDelete extends ConfirmFormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -8,14 +8,14 @@ use Drupal\Core\Ajax\RedirectCommand;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\ctools\TypedDataResolver;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class RelationshipConfigure extends FormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -6,7 +6,7 @@ use Drupal\Core\Form\ConfirmFormBase;
use Drupal\Core\Form\ConfirmFormHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Url;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -15,7 +15,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class RequiredContextDelete extends ConfirmFormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......@@ -42,7 +42,7 @@ abstract class RequiredContextDelete extends ConfirmFormBase {
}
/**
* @param \Drupal\user\SharedTempStoreFactory $tempstore
* @param \Drupal\Core\TempStore\SharedTempStoreFactory $tempstore
*/
function __construct(SharedTempStoreFactory $tempstore) {
$this->tempstore = $tempstore;
......
......@@ -7,14 +7,14 @@ use Drupal\Core\Ajax\CloseModalDialogCommand;
use Drupal\Core\Ajax\RedirectCommand;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Drupal\Core\Url;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ResolverRelationshipConfigure extends FormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
......@@ -6,13 +6,13 @@ use Drupal\Core\Form\ConfirmFormBase;
use Drupal\Core\Form\ConfirmFormHelper;
use Drupal\Core\Form\FormStateInterface;
use Drupal\ctools\TypedDataResolver;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class ResolverRelationshipDelete extends ConfirmFormBase {
/**
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......@@ -44,7 +44,7 @@ abstract class ResolverRelationshipDelete extends ConfirmFormBase {
}
/**
* @param \Drupal\user\SharedTempStoreFactory $tempstore
* @param \Drupal\Core\TempStore\SharedTempStoreFactory $tempstore
* The shared tempstore.
* @param \Drupal\ctools\TypedDataResolver $resolver
* The typed data resolver.
......
......@@ -5,7 +5,7 @@ namespace Drupal\ctools\ParamConverter;
use Drupal\Component\Utility\NestedArray;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\ParamConverter\ParamConverterInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\Routing\Route;
/**
......@@ -82,7 +82,7 @@ class TempstoreConverter implements ParamConverterInterface {
/**
* The tempstore factory.
*
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......@@ -96,7 +96,7 @@ class TempstoreConverter implements ParamConverterInterface {
/**
* Constructs a TempstoreConverter.
*
* @param \Drupal\user\SharedTempStoreFactory $tempstore
* @param \Drupal\Core\TempStore\SharedTempStoreFactory $tempstore
*/
public function __construct(SharedTempStoreFactory $tempstore, EntityTypeManagerInterface $entity_type_manager) {
$this->tempstore = $tempstore;
......
......@@ -3,7 +3,7 @@
namespace Drupal\ctools;
use Drupal\Core\DependencyInjection\DependencySerializationTrait;
use Drupal\user\SharedTempStore;
use Drupal\Core\TempStore\SharedTempStore;
/**
* An extension of the SharedTempStore system for serialized data.
......
......@@ -5,7 +5,7 @@ namespace Drupal\ctools;
use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
use Drupal\Core\Lock\LockBackendInterface;
use Drupal\Core\Session\AccountProxyInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\HttpFoundation\RequestStack;
/**
......
......@@ -8,7 +8,7 @@ use Drupal\Core\Form\FormBuilderInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\ctools\Event\WizardEvent;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
......@@ -24,7 +24,7 @@ abstract class EntityFormWizardBase extends FormWizardBase implements EntityForm
protected $entityTypeManager;
/**
* @param \Drupal\user\SharedTempStoreFactory $tempstore
* @param \Drupal\Core\TempStore\SharedTempStoreFactory $tempstore
* Tempstore Factory for keeping track of values in each step of the
* wizard.
* @param \Drupal\Core\Form\FormBuilderInterface $builder
......@@ -52,7 +52,7 @@ abstract class EntityFormWizardBase extends FormWizardBase implements EntityForm
*/
public static function getParameters() {
return [
'tempstore' => \Drupal::service('user.shared_tempstore'),
'tempstore' => \Drupal::service('tempstore.shared'),
'builder' => \Drupal::service('form_builder'),
'class_resolver' => \Drupal::service('class_resolver'),
'event_dispatcher' => \Drupal::service('event_dispatcher'),
......
......@@ -13,7 +13,8 @@ use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
use Drupal\ctools\Ajax\OpenModalWizardCommand;
use Drupal\ctools\Event\WizardEvent;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\PrivateTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
/**
......@@ -24,7 +25,7 @@ abstract class FormWizardBase extends FormBase implements FormWizardInterface {
/**
* Tempstore Factory for keeping track of values in each step of the wizard.
*
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......@@ -71,7 +72,7 @@ abstract class FormWizardBase extends FormBase implements FormWizardInterface {
protected $step;
/**
* @param \Drupal\user\SharedTempStoreFactory $tempstore
* @param \Drupal\Core\TempStore\SharedTempStoreFactory $tempstore
* Tempstore Factory for keeping track of values in each step of the
* wizard.
* @param \Drupal\Core\Form\FormBuilderInterface $builder
......@@ -103,7 +104,7 @@ abstract class FormWizardBase extends FormBase implements FormWizardInterface {
*/
public static function getParameters() {
return [
'tempstore' => \Drupal::service('user.shared_tempstore'),
'tempstore' => \Drupal::service('tempstore.shared'),
'builder' => \Drupal::service('form_builder'),
'class_resolver' => \Drupal::service('class_resolver'),
'event_dispatcher' => \Drupal::service('event_dispatcher'),
......@@ -131,7 +132,8 @@ abstract class FormWizardBase extends FormBase implements FormWizardInterface {
* {@inheritdoc}
*/
public function getTempstore() {
return $this->tempstore->get($this->getTempstoreId());
$tempstore = $this->tempstore->get($this->getTempstoreId());
return $tempstore;
}
/**
......
......@@ -39,7 +39,7 @@ interface FormWizardInterface extends FormInterface {
/**
* The active SharedTempStore for this wizard.
*
* @return \Drupal\user\SharedTempStore
* @return \Drupal\Core\TempStore\SharedTempStore
*/
public function getTempstore();
......
......@@ -5,7 +5,7 @@ namespace Drupal\ctools_wizard_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\user\SharedTempStoreFactory;
use Drupal\Core\TempStore\SharedTempStoreFactory;
use Symfony\Component\DependencyInjection\ContainerInterface;
class ExampleConfigEntityExternalForm extends FormBase {
......@@ -13,7 +13,7 @@ class ExampleConfigEntityExternalForm extends FormBase {
/**
* Tempstore factory.
*
* @var \Drupal\user\SharedTempStoreFactory
* @var \Drupal\Core\TempStore\SharedTempStoreFactory
*/
protected $tempstore;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment