protected function MarkerIconService::setDefaultIconStyle in Geofield Map 8.2
Set Geofield Map Default Icon Style.
1 call to MarkerIconService::setDefaultIconStyle()
- MarkerIconService::getImageStyleOptions in src/
Services/ MarkerIconService.php - Generate Image Style Selection Element.
File
- src/
Services/ MarkerIconService.php, line 121
Class
- MarkerIconService
- Provides an Icon Managed File Service.
Namespace
Drupal\geofield_map\ServicesCode
protected function setDefaultIconStyle() {
$image_style_path = drupal_get_path('module', 'geofield_map') . '/config/optional/image.style.geofield_map_default_icon_style.yml';
$image_style_data = Yaml::parse(file_get_contents($image_style_path));
$geofield_map_default_icon_style = $this->config
->getEditable('image.style.geofield_map_default_icon_style');
if ($geofield_map_default_icon_style instanceof Config) {
$geofield_map_default_icon_style
->setData($image_style_data)
->save(TRUE);
}
}