private function ip_geoloc_plugin_style_leaflet::_add_marker_class_names in IP Geolocation Views & Maps 7
1 call to ip_geoloc_plugin_style_leaflet::_add_marker_class_names()
- ip_geoloc_plugin_style_leaflet::options_form in views/
ip_geoloc_plugin_style_leaflet.inc - Implements options_form().
File
- views/
ip_geoloc_plugin_style_leaflet.inc, line 401
Class
Code
private function _add_marker_class_names(&$form, $fields, &$weight) {
$form['class_names'] = array(
'#title' => t('Marker class names (advanced)'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => empty($this->options['class_names']['marker_class_names']),
'#description' => t('Select fields whose values will be appended to the <em>class</em> attribute on the marker HTML.'),
'#weight' => $weight++,
);
$note1 = t('NOTE: This option will only have an effect when you also have CCS or Javascript code that responds to the added classes.');
$note2 = t('The class name format is <em>field-[machine-name]__[value]</em>. Spaces and underscores in field name and value are converted to hyphens. If the value is a list option, the machine-name is used. To check inspect the page source in your browser. Example <em>field-size_extra-large</em>');
$form['class_names']['marker_class_names'] = array(
'#title' => t('Views fields whose values will be added as class names'),
'#type' => 'select',
'#multiple' => TRUE,
'#size' => 6,
'#default_value' => $this->options['class_names']['marker_class_names'],
'#options' => $fields,
'#description' => "{$note1} {$note2}",
);
}