public function MarkerIconService::getIconFileSelectElement in Geofield Map 8.2
Generate Icon File Select Element.
Parameters
string $file_uri: The file uri to save.
int $row_id: The row id.
Return value
array The icon preview element.
File
- src/
Services/ MarkerIconService.php, line 369
Class
- MarkerIconService
- Provides an Icon Managed File Service.
Namespace
Drupal\geofield_map\ServicesCode
public function getIconFileSelectElement($file_uri, $row_id = NULL) {
$options = array_merge([
'none' => '_ none _',
], $this
->getMarkersFilesList());
$element = [
'#row_id' => $row_id,
'#geofield_map_marker_icon_select' => TRUE,
'#title' => $this
->t('Marker'),
'#type' => 'select',
'#options' => $options,
'#default_value' => $file_uri,
'#description' => $this
->t('Choose among the markers files available'),
];
return $element;
}