You are here

protected function LeafletAttachment::defineOptions in Leaflet 8

Same name and namespace in other branches
  1. 2.1.x modules/leaflet_views/src/Plugin/views/display/LeafletAttachment.php \Drupal\leaflet_views\Plugin\views\display\LeafletAttachment::defineOptions()
  2. 2.0.x modules/leaflet_views/src/Plugin/views/display/LeafletAttachment.php \Drupal\leaflet_views\Plugin\views\display\LeafletAttachment::defineOptions()

Information about options for all kinds of purposes will be held here.


'option_name' => array(
 - 'default' => default value,
 - 'contains' => (optional) array of items this contains, with its own
     defaults, etc. If contains is set, the default will be ignored and
     assumed to be array().
 ),

Return value

array Returns the options of this handler/plugin.

Overrides Attachment::defineOptions

File

modules/leaflet_views/src/Plugin/views/display/LeafletAttachment.php, line 112

Class

LeafletAttachment
Plugin attachment of additional leaflet features to leaflet map views.

Namespace

Drupal\leaflet_views\Plugin\views\display

Code

protected function defineOptions() {
  $options = parent::defineOptions();

  // Overrides for standard stuff.
  $options['style']['contains']['type']['default'] = 'leaflet_marker_default';
  $options['defaults']['default']['style'] = FALSE;
  $options['row']['contains']['type']['default'] = 'leaflet_marker';
  $options['defaults']['default']['row'] = FALSE;
  return $options;
}