private function IpGeoLocPluginStyleLeaflet::addMarkerTags in IP Geolocation Views & Maps 8
Form part definition.
1 call to IpGeoLocPluginStyleLeaflet::addMarkerTags()
- IpGeoLocPluginStyleLeaflet::buildOptionsForm in src/
Plugin/ views/ style/ IpGeoLocPluginStyleLeaflet.php - Provide a form to edit options for this plugin.
File
- src/
Plugin/ views/ style/ IpGeoLocPluginStyleLeaflet.php, line 439
Class
- IpGeoLocPluginStyleLeaflet
- Views Style plugin extension for Leaflet (if enabled).
Namespace
Drupal\ip_geoloc\Plugin\views\styleCode
private function addMarkerTags(&$form, $fields, &$weight) {
$form['tags'] = [
'#title' => $this
->t('Marker tags'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => empty($this->options['tags']['marker_tag']),
'#description' => $this
->t('Each marker may have a tag. A tag is a number or short text shown permanently above, below or inside the marker.'),
'#weight' => $weight++,
];
$form['tags']['marker_tag'] = [
'#title' => $this
->t('Views field to populate tags'),
'#type' => 'select',
'#default_value' => $this->options['tags']['marker_tag'],
'#options' => $fields,
'#description' => $this
->t('Example: "Content: Title". Use "Global: View result counter" if you want to number your locations.'),
];
$form['tags']['tag_css_class'] = [
'#title' => $this
->t('Tag position and style'),
'#type' => 'textfield',
'#default_value' => $this->options['tags']['tag_css_class'],
'#description' => $this
->t('The CSS class or classes applied to each tag. Tagged marker CSS classes coming with this module are <strong>tag-above-marker</strong>, <strong>tag-below-marker</strong> and <strong>tag-inside-marker</strong>. If you opted to have <em>no markers</em>, i.e. tags only, you may use <strong>tag-rounded-corners</strong> or <strong>tag-pointy-circle</strong>, which is recommended for numbers. You may also create your own CSS classes and use them here.'),
];
}