Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
geofield_map
Commits
bcb9116a
Commit
bcb9116a
authored
Jun 23, 2018
by
itamair
Browse files
Default fallback icon fixed in the TaxonomyTermThemer
parent
fbd42a70
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Plugin/GeofieldMapThemer/TaxonomyTermThemer.php
View file @
bcb9116a
...
...
@@ -309,11 +309,11 @@ class TaxonomyTermThemer extends MapThemerBase {
* {@inheritdoc}
*/
public
function
getIcon
(
array
$datum
,
GeofieldGoogleMapViewStyle
$geofieldMapView
,
EntityInterface
$entity
,
$map_theming_values
)
{
$fid
=
NULL
;
$image_style
=
NULL
;
$taxonomy_field
=
$map_theming_values
[
'taxonomy_field'
];
$fallback_icon_style
=
isset
(
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
'__default_value__'
][
'image_style'
])
?
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
'__default_value__'
][
'image_style'
]
:
NULL
;
$fallback_icon
=
isset
(
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
'__default_value__'
][
'icon_file'
])
?
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
'__default_value__'
][
'icon_file'
][
'fids'
]
:
NULL
;
$image_style
=
$fallback_icon_style
;
$fid
=
$fallback_icon
;
if
(
isset
(
$entity
->
{
$taxonomy_field
})
&&
!
empty
(
$entity
->
{
$taxonomy_field
}
->
target_id
))
{
$taxonomy_field_term
=
$entity
->
{
$taxonomy_field
}
->
target_id
;
$image_style
=
isset
(
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
$taxonomy_field_term
][
'image_style'
])
?
$map_theming_values
[
'fields'
][
$taxonomy_field
][
'terms'
][
$taxonomy_field_term
][
'image_style'
]
:
$fallback_icon_style
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment