Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-2842405
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
drupal-2842405
Commits
ff61cd98
Commit
ff61cd98
authored
2 months ago
by
Darren Fisher
Browse files
Options
Downloads
Patches
Plain Diff
Attempt to fix further phpcs and phpstan errors.
parent
59037845
No related branches found
No related tags found
No related merge requests found
Pipeline
#384861
failed
2 months ago
Stage: 🪄 Lint
Stage: 🗜️ Test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/system/system.module
+6
-2
6 additions, 2 deletions
core/modules/system/system.module
with
6 additions
and
2 deletions
core/modules/system/system.module
+
6
−
2
View file @
ff61cd98
...
...
@@ -6,6 +6,7 @@
use
Drupal\Component\FileSecurity\FileSecurity
;
use
Drupal\Core\Access\AccessResult
;
use
Drupal\Core\Access\AccessResultInterface
;
use
Drupal\Core\Extension\Extension
;
use
Drupal\Core\Field\FieldDefinitionInterface
;
use
Drupal\Core\Field\FieldItemListInterface
;
...
...
@@ -16,6 +17,7 @@
use
Drupal\Core\StreamWrapper\LocalStream
;
use
Drupal\Core\StreamWrapper\StreamWrapperManager
;
use
Drupal\Core\Url
;
use
Symfony\Component\HttpFoundation\Response
;
use
Symfony\Component\HttpFoundation\RedirectResponse
;
use
Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
;
...
...
@@ -548,12 +550,14 @@ function system_page_top(): array {
}
}
}
// Default return value.
return
[];
}
/**
* Implements hook_entity_field_access().
*/
function
system_entity_field_access
(
$operation
,
FieldDefinitionInterface
$field_definition
,
AccountInterface
$account
,
?FieldItemListInterface
$items
=
NULL
):
\Drupal\Core\Access\
AccessResultInterface
{
function
system_entity_field_access
(
$operation
,
FieldDefinitionInterface
$field_definition
,
AccountInterface
$account
,
?FieldItemListInterface
$items
=
NULL
):
AccessResultInterface
{
if
(
$items
)
{
$entity_type
=
$items
->
getEntity
()
->
getEntityType
();
if
(
$entity_type
->
hasKey
(
'langcode'
)
&&
$entity_type
->
getKey
(
'langcode'
)
===
$field_definition
->
getName
())
{
...
...
@@ -566,7 +570,7 @@ function system_entity_field_access($operation, FieldDefinitionInterface $field_
/**
* Implements hook_file_download().
*/
function
system_file_download
(
$uri
):
\Symfony\Component\HttpFoundation\
Response
{
function
system_file_download
(
$uri
):
Response
{
$stream_wrapper_manager
=
\Drupal
::
service
(
'stream_wrapper_manager'
);
$scheme
=
$stream_wrapper_manager
->
getScheme
(
$uri
);
if
(
$stream_wrapper_manager
->
isValidScheme
(
$scheme
))
{
...
...
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