Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
tmgmt_smartling
Commits
def8ffd8
Commit
def8ffd8
authored
Feb 11, 2021
by
Loparev
Browse files
Removed usage of deprecated services
parent
e11d0359
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/Form/SendContextActionApproveForm.php
View file @
def8ffd8
...
...
@@ -28,14 +28,14 @@ class SendContextActionApproveForm extends ConfirmFormBase {
/**
* The temp store factory.
*
* @var \Drupal\
user
\PrivateTempStoreFactory
* @var \Drupal\
Core\TempStore
\PrivateTempStoreFactory
*/
protected
$tempStoreFactory
;
/**
* The shared store factory.
*
* @var \Drupal\
user
\SharedTempStore
* @var \Drupal\
Core\TempStore
\SharedTempStore
Factory
*/
protected
$sharedStoreFactory
;
...
...
@@ -294,7 +294,7 @@ class SendContextActionApproveForm extends ConfirmFormBase {
// Switch user back after batch. We have to use \Drupal::getContainer() because we don't have $this context in
// static functions.
$user_name_before_switching
=
\
Drupal
::
getContainer
()
->
get
(
'
user.shared_
tempstore'
)
->
get
(
'tempstore
.shared
'
)
->
get
(
'tmgmt_smartling_send_context'
)
->
get
(
'user_name_before_switching'
);
...
...
src/Plugin/Action/SendContextAction.php
View file @
def8ffd8
...
...
@@ -30,7 +30,7 @@ class SendContextAction extends ActionBase implements ContainerFactoryPluginInte
/**
* The tempstore factory.
*
* @var \Drupal\
user
\PrivateTempStoreFactory
* @var \Drupal\
Core\TempStore
\PrivateTempStoreFactory
*/
protected
$tempStoreFactory
;
...
...
src/SmartlingTranslatorUi.php
View file @
def8ffd8
...
...
@@ -361,7 +361,7 @@ class SmartlingTranslatorUi extends TranslatorPluginUiBase {
$translator_settings
=
$form_state
->
getValue
(
'settings'
);
\
Drupal
::
getContainer
()
->
get
(
'
user.shared_
tempstore'
)
->
get
(
'tempstore
.shared
'
)
->
get
(
self
::
TEMP_STORAGE_NAME
)
->
set
(
self
::
USER_NAME_BEFORE_SWITCHING
,
...
...
@@ -457,7 +457,7 @@ class SmartlingTranslatorUi extends TranslatorPluginUiBase {
*/
public
static
function
finishBatch
()
{
$user_name_before_switching
=
\
Drupal
::
getContainer
()
->
get
(
'
user.shared_
tempstore'
)
->
get
(
'tempstore
.shared
'
)
->
get
(
self
::
TEMP_STORAGE_NAME
)
->
get
(
self
::
USER_NAME_BEFORE_SWITCHING
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment