Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
digit-joinup-reference
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ec-europa
digit-joinup-reference
Commits
92662ff7
Commit
92662ff7
authored
2 months ago
by
Alexandre Dias
Committed by
Claudiu Cristea
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
ISAICP-8916: Missing map formatter change.
parent
6bfb746b
No related branches found
No related tags found
1 merge request
!209
Release 2.2.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
web/modules/custom/joinup_event/src/Plugin/Field/FieldFormatter/WebtoolsMapFormatter.php
+3
-2
3 additions, 2 deletions
.../src/Plugin/Field/FieldFormatter/WebtoolsMapFormatter.php
with
3 additions
and
2 deletions
web/modules/custom/joinup_event/src/Plugin/Field/FieldFormatter/WebtoolsMapFormatter.php
+
3
−
2
View file @
92662ff7
...
...
@@ -32,8 +32,9 @@ public function viewElements(FieldItemListInterface $items, $langcode) {
if
(
!
$entity
->
hasField
(
'field_location'
))
{
throw
new
\InvalidArgumentException
(
'Can only display map for fields that are linked to a location.'
);
}
$json_data
[
'layers'
][
0
][
'markers'
][
'features'
][
0
][
'properties'
][
'name'
]
=
$entity
->
label
();
$json_data
[
'layers'
][
0
][
'markers'
][
'features'
][
0
][
'properties'
][
'description'
]
=
$entity
->
field_location
->
value
??
''
;
$json_data
[
'layers'
][
'markers'
][
0
][
'data'
][
'features'
][
0
][
'properties'
][
'name'
]
=
$entity
->
label
();
$json_data
[
'layers'
][
'markers'
][
0
][
'data'
][
'features'
][
0
][
'properties'
][
'description'
]
=
$entity
->
field_location
->
value
??
''
;
$json
->
setJson
(
$json_data
);
}
...
...
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