Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
media_link_enhancements
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
media_link_enhancements
Commits
4f622a42
Commit
4f622a42
authored
3 years ago
by
Sam Lerner
Committed by
Cameron Prince
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3276494
by SamLerner: PHP Deprecated warnings when using drush and PHP 8
parent
b26e342e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
media_link_enhancements.module
+2
-2
2 additions, 2 deletions
media_link_enhancements.module
src/Routing/MediaLinkEnhancementsUrlGenerator.php
+2
-6
2 additions, 6 deletions
src/Routing/MediaLinkEnhancementsUrlGenerator.php
with
4 additions
and
8 deletions
media_link_enhancements.module
+
2
−
2
View file @
4f622a42
...
...
@@ -55,8 +55,8 @@ function media_link_enhancements_entity_display_build_alter(&$build, $context) {
$mid
=
$url
->
getRouteParameters
()[
'media'
];
$media
=
\Drupal
::
entityTypeManager
()
->
getStorage
(
'media'
)
->
load
(
$mid
);
// Bail if there's no media object, media is unpublished or the bundle
isn't
// allowed.
// Bail if there's no media object, media is unpublished or the bundle
//
isn't
allowed.
if
(
empty
(
$media
)
||
!
$media
->
isPublished
()
||
!
$helper
->
checkBundle
(
$media
->
bundle
(),
'type_size_appending_bundles'
))
{
continue
;
}
...
...
This diff is collapsed.
Click to expand it.
src/Routing/MediaLinkEnhancementsUrlGenerator.php
+
2
−
6
View file @
4f622a42
...
...
@@ -91,7 +91,7 @@ class MediaLinkEnhancementsUrlGenerator extends UrlGenerator {
* @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
* A request stack object.
* @param string[] $filter_protocols
*
(optional)
An array of protocols allowed for URL generation.
* An array of protocols allowed for URL generation.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
...
...
@@ -99,11 +99,7 @@ class MediaLinkEnhancementsUrlGenerator extends UrlGenerator {
* @param \Drupal\media_link_enhancements\MediaLinkEnhancementsHelperInterface $helper
* Helper service.
*/
// We ignore the next line because we can't maintain compatibility
// with the core class and also have the argument list as the last
// argument.
// @codingStandardsIgnoreLine
public
function
__construct
(
RouteProviderInterface
$provider
,
OutboundPathProcessorInterface
$path_processor
,
OutboundRouteProcessorInterface
$route_processor
,
RequestStack
$request_stack
,
array
$filter_protocols
=
[
'http'
,
'https'
],
EntityTypeManagerInterface
$entity_type_manager
,
ConfigFactoryInterface
$config_factory
,
MediaLinkEnhancementsHelperInterface
$helper
)
{
public
function
__construct
(
RouteProviderInterface
$provider
,
OutboundPathProcessorInterface
$path_processor
,
OutboundRouteProcessorInterface
$route_processor
,
RequestStack
$request_stack
,
array
$filter_protocols
,
EntityTypeManagerInterface
$entity_type_manager
,
ConfigFactoryInterface
$config_factory
,
MediaLinkEnhancementsHelperInterface
$helper
)
{
$this
->
provider
=
$provider
;
$this
->
context
=
new
RequestContext
();
$this
->
pathProcessor
=
$path_processor
;
...
...
This diff is collapsed.
Click to expand it.
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