Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
open_readspeaker
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
open_readspeaker
Commits
22ca1036
Commit
22ca1036
authored
1 year ago
by
Sven Schüring
Committed by
Sven Schüring
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix
#3384235
: deprecation dynamic property
parent
1af2d20d
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!25
Fix #3384235: deprecation dynamic property
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Plugin/Block/OpenReadspeakerBlock.php
+13
-6
13 additions, 6 deletions
src/Plugin/Block/OpenReadspeakerBlock.php
with
13 additions
and
6 deletions
src/Plugin/Block/OpenReadspeakerBlock.php
+
13
−
6
View file @
22ca1036
...
...
@@ -9,7 +9,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
use
Drupal\Core\Plugin\ContainerFactoryPluginInterface
;
use
Drupal\Core\Form\FormStateInterface
;
use
Drupal\Core\Config\ConfigFactoryInterface
;
use
Symfony\Component\HttpFoundation\Request
;
use
Symfony\Component\HttpFoundation\Request
Stack
;
/**
* Provides a 'OpenReadspeakerBlock' block.
...
...
@@ -28,6 +28,12 @@ class OpenReadspeakerBlock extends BlockBase implements ContainerFactoryPluginIn
*/
protected
$configFactory
;
/**
* The request stack.
*
* @var \Symfony\Component\HttpFoundation\RequestStack
*/
protected
$requestStack
;
/**
* Constructs a Drupal\Component\Plugin\PluginBase object.
*
...
...
@@ -39,7 +45,7 @@ class OpenReadspeakerBlock extends BlockBase implements ContainerFactoryPluginIn
* The plugin implementation definition.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory service.
* @param \Symfony\Component\HttpFoundation\Request $request
* @param \Symfony\Component\HttpFoundation\Request
Stack
$request
Stack
* The current request.
*/
public
function
__construct
(
...
...
@@ -47,10 +53,10 @@ class OpenReadspeakerBlock extends BlockBase implements ContainerFactoryPluginIn
$plugin_id
,
$plugin_definition
,
ConfigFactoryInterface
$config_factory
,
Request
$request
)
{
Request
Stack
$request
Stack
)
{
parent
::
__construct
(
$configuration
,
$plugin_id
,
$plugin_definition
);
$this
->
configFactory
=
$config_factory
;
$this
->
request
=
$request
;
$this
->
request
Stack
=
$request
Stack
;
}
/**
...
...
@@ -62,7 +68,7 @@ class OpenReadspeakerBlock extends BlockBase implements ContainerFactoryPluginIn
$plugin_id
,
$plugin_definition
,
$container
->
get
(
'config.factory'
),
$container
->
get
(
'request_stack'
)
->
getCurrentRequest
()
$container
->
get
(
'request_stack'
)
);
}
...
...
@@ -128,9 +134,10 @@ class OpenReadspeakerBlock extends BlockBase implements ContainerFactoryPluginIn
$accountid
=
$config
->
get
(
'open_readspeaker_accountid'
);
$cdn
=
$config
->
get
(
'open_readspeaker_cdn_region'
);
$post_mode
=
$config
->
get
(
'open_readspeaker_post_mode'
);
$request
=
$this
->
requestStack
->
getCurrentRequest
();
$url
=
Url
::
fromRoute
(
'<current>'
,
$
this
->
request
->
query
->
all
(),
$request
->
query
->
all
(),
[
'absolute'
=>
TRUE
]
)
->
toString
();
...
...
This diff is collapsed.
Click to expand it.
Sven Schüring
@sunlix
mentioned in commit
832ab68b
·
7 months ago
mentioned in commit
832ab68b
mentioned in commit 832ab68b5816c032f8da455153179dc956abc2cf
Toggle commit list
Sven Schüring
@sunlix
mentioned in merge request
!32 (merged)
·
7 months ago
mentioned in merge request
!32 (merged)
mentioned in merge request !32
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment