You are here

protected function LeafletMarker::defineOptions in Leaflet 2.0.x

Same name and namespace in other branches
  1. 8 modules/leaflet_views/src/Plugin/views/row/LeafletMarker.php \Drupal\leaflet_views\Plugin\views\row\LeafletMarker::defineOptions()
  2. 2.1.x modules/leaflet_views/src/Plugin/views/row/LeafletMarker.php \Drupal\leaflet_views\Plugin\views\row\LeafletMarker::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 RowPluginBase::defineOptions

File

modules/leaflet_views/src/Plugin/views/row/LeafletMarker.php, line 435

Class

LeafletMarker
Plugin which formats a row as a leaflet marker.

Namespace

Drupal\leaflet_views\Plugin\views\row

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['data_source'] = [
    'default' => '',
  ];
  $options['name_field'] = [
    'default' => '',
  ];
  $options['description_field'] = [
    'default' => '',
  ];
  $options['view_mode'] = [
    'default' => 'teaser',
  ];
  return $options;
}