Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
simple_sitemap
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
simple_sitemap
Commits
129f39b6
Commit
129f39b6
authored
Sep 08, 2019
by
Pawel G
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#3078369
by jcontreras, gbyte.co: Error: Call to a member function getFileUri()
parent
221e6175
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
...in/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
+9
-7
No files found.
src/Plugin/simple_sitemap/UrlGenerator/EntityUrlGeneratorBase.php
View file @
129f39b6
...
...
@@ -214,13 +214,15 @@ abstract class EntityUrlGeneratorBase extends UrlGeneratorBase {
foreach
(
$entity
->
getFieldDefinitions
()
as
$field
)
{
if
(
$field
->
getType
()
===
'image'
)
{
foreach
(
$entity
->
get
(
$field
->
getName
())
->
getValue
()
as
$value
)
{
$image_data
[]
=
[
'path'
=>
$this
->
replaceBaseUrlWithCustom
(
file_create_url
(
File
::
load
(
$value
[
'target_id'
])
->
getFileUri
())
),
'alt'
=>
$value
[
'alt'
],
'title'
=>
$value
[
'title'
],
]
;
if
(
!
empty
(
$file
=
File
::
load
(
$value
[
'target_id'
])))
{
$image_data
[]
=
[
'path'
=>
$this
->
replaceBaseUrlWithCustom
(
file_create_url
(
$file
->
getFileUri
())
),
'alt'
=>
$value
[
'alt'
],
'title'
=>
$value
[
'title'
],
];
}
}
}
}
...
...
Write
Preview
Markdown
is supported
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