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
ca7887e2
Commit
ca7887e2
authored
Jun 14, 2018
by
carstenG
Committed by
itamair
Jun 14, 2018
Browse files
Issue #2979287 by carstenG: Notice on node display form
parent
ecd26225
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Plugin/Field/FieldFormatter/GeofieldGoogleMapFormatter.php
View file @
ca7887e2
...
...
@@ -256,6 +256,7 @@ class GeofieldGoogleMapFormatter extends FormatterBase implements ContainerFacto
],
];
$file_upload_help
=
$this
->
markerIcon
->
getFileUploadHelp
();
$fid
=
(
integer
)
!
empty
(
$settings
[
'map_marker_and_infowindow'
][
'icon_file_wrapper'
][
'icon_file'
][
'fids'
])
?
$settings
[
'map_marker_and_infowindow'
][
'icon_file_wrapper'
][
'icon_file'
][
'fids'
]
:
NULL
;
$elements
[
'map_marker_and_infowindow'
][
'icon_file_wrapper'
]
=
[
'#type'
=>
'container'
,
...
...
@@ -264,7 +265,7 @@ class GeofieldGoogleMapFormatter extends FormatterBase implements ContainerFacto
],
'description'
=>
[
'#markup'
=>
Markup
::
create
(
$this
->
t
(
'The chosen icon file will be used as Marker for this content @file_upload_help'
,
[
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
markerIcon
->
getF
ile
U
pload
H
elp
()
),
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
f
ile
_u
pload
_h
elp
),
])),
],
'icon_file'
=>
$this
->
markerIcon
->
getIconFileManagedElement
(
$fid
),
...
...
src/Plugin/GeofieldMapThemer/CustomIconThemer.php
View file @
ca7887e2
...
...
@@ -36,13 +36,14 @@ class CustomIconThemer extends MapThemerBase {
// Get the existing (Default) Element settings.
$default_element
=
$this
->
getDefaultThemerElement
(
$defaults
);
$file_upload_help
=
$this
->
markerIcon
->
getFileUploadHelp
();
$fid
=
(
integer
)
!
empty
(
$default_element
[
'icon_file'
][
'fids'
])
?
$default_element
[
'icon_file'
][
'fids'
]
:
NULL
;
$element
=
[
'#markup'
=>
Markup
::
create
(
$this
->
t
(
'<label>Custom Icon Image File</label>'
)),
'#type'
=>
'container'
,
'description'
=>
[
'#markup'
=>
Markup
::
create
(
$this
->
t
(
'The chosen icon file will be used as Marker for all Geofield Map features @file_upload_help'
,
[
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
markerIcon
->
getF
ile
U
pload
H
elp
()
),
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
f
ile
_u
pload
_h
elp
),
])),
],
'icon_file'
=>
$this
->
markerIcon
->
getIconFileManagedElement
(
$fid
[
0
]),
...
...
src/Plugin/GeofieldMapThemer/EntityTypeThemer.php
View file @
ca7887e2
...
...
@@ -124,16 +124,19 @@ class EntityTypeThemer extends MapThemerBase {
],
];
$label_alias_upload_help
=
$this
->
getLabelAliasHelp
();
$file_upload_help
=
$this
->
markerIcon
->
getFileUploadHelp
();
$element
=
[
'#type'
=>
'table'
,
'#header'
=>
[
$this
->
t
(
'@entity type Type/Bundle'
,
[
'@entity type'
=>
$entity_type
]),
$this
->
t
(
'Weight'
),
Markup
::
create
(
$this
->
t
(
'Label Alias @description'
,
[
'@description'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
getL
abel
A
lias
H
elp
()
),
'@description'
=>
$this
->
renderer
->
renderPlain
(
$
l
abel
_a
lias
_upload_h
elp
),
])),
Markup
::
create
(
$this
->
t
(
'Marker Icon @file_upload_help'
,
[
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
markerIcon
->
getF
ile
U
pload
H
elp
()
),
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
f
ile
_u
pload
_h
elp
),
])),
$this
->
t
(
'Icon Image Style'
),
$this
->
t
(
'Exclude from Legend'
),
...
...
src/Plugin/GeofieldMapThemer/TaxonomyTermThemer.php
View file @
ca7887e2
...
...
@@ -219,6 +219,9 @@ class TaxonomyTermThemer extends MapThemerBase {
],
];
$label_alias_upload_help
=
$this
->
getLabelAliasHelp
();
$file_upload_help
=
$this
->
markerIcon
->
getFileUploadHelp
();
$element
[
'fields'
][
$k
]
=
[
'#type'
=>
'container'
,
'terms'
=>
[
...
...
@@ -227,10 +230,10 @@ class TaxonomyTermThemer extends MapThemerBase {
$this
->
t
(
'Taxonomy term'
),
$this
->
t
(
'Weight'
),
Markup
::
create
(
$this
->
t
(
'Term Alias @description'
,
[
'@description'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
getL
abel
A
lias
H
elp
()
),
'@description'
=>
$this
->
renderer
->
renderPlain
(
$
l
abel
_a
lias
_upload_h
elp
),
])),
Markup
::
create
(
$this
->
t
(
'Marker Icon @file_upload_help'
,
[
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
this
->
markerIcon
->
getF
ile
U
pload
H
elp
()
),
'@file_upload_help'
=>
$this
->
renderer
->
renderPlain
(
$
f
ile
_u
pload
_h
elp
),
])),
$this
->
t
(
'Icon Image Style'
),
$this
->
t
(
'Hide from Legend'
),
...
...
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