You are here

protected function Layer::defineOptions in Geolocation Field 8.3

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

src/Plugin/views/display/Layer.php, line 47

Class

Layer
The plugin that handles an attachment display.

Namespace

Drupal\geolocation\Plugin\views\display

Code

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

  // Force the style plugin to 'entity_reference_style' and the row plugin to
  // 'fields'.
  $options['style']['contains']['type'] = [
    'default' => 'geolocation_layer',
  ];
  $options['defaults']['default']['style'] = FALSE;
  $options['row']['contains']['type'] = [
    'default' => 'fields',
  ];
  $options['defaults']['default']['row'] = FALSE;
  $options['attachment_position'] = [
    'default' => 'before',
  ];
  unset($options['render_pager']);
  return $options;
}