You are here

class openlayers_views_plugin_display_openlayers in Openlayers 6.2

Same name and namespace in other branches
  1. 7.3 modules/openlayers_views/views/openlayers_views_plugin_display_openlayers.inc \openlayers_views_plugin_display_openlayers
  2. 7.2 modules/openlayers_views/views/openlayers_views_plugin_display_openlayers.inc \openlayers_views_plugin_display_openlayers

@file Display plugin for OpenLayers Data

Hierarchy

Expanded class hierarchy of openlayers_views_plugin_display_openlayers

Related topics

1 string reference to 'openlayers_views_plugin_display_openlayers'
openlayers_views_views_plugins in modules/openlayers_views/views/openlayers_views.views.inc
Implementation of hook_views_plugins().

File

modules/openlayers_views/views/openlayers_views_plugin_display_openlayers.inc, line 10
Display plugin for OpenLayers Data

View source
class openlayers_views_plugin_display_openlayers extends views_plugin_display {
  function uses_breadcrumb() {
    return FALSE;
  }
  function get_style_type() {
    return 'openlayers';
  }

  /**
   * OpenLayers data features are used directly in the map object.
   */
  function execute() {
    return $this->view
      ->render();
  }
  function preview() {
    return '<pre>' . check_plain($this->view
      ->render()) . '</pre>';
  }

  /**
   * Instead of going through the standard views_view.tpl.php, delegate this
   * to the style handler.
   */
  function render() {
    return $this->view->style_plugin
      ->render($this->view->result);
  }
  function option_definition() {
    $options = parent::option_definition();

    // Prevent the title from being translated at the view level
    // so that it can be translated at the OpenLayers level
    $options['title']['translatable'] = 0;
    $options['displays'] = array(
      'default' => array(),
    );

    // Overrides for standard stuff:
    $options['style_plugin']['default'] = 'openlayers_data';
    $options['row_plugin']['default'] = '';
    $options['defaults']['default']['row_plugin'] = FALSE;
    $options['defaults']['default']['row_options'] = FALSE;
    return $options;
  }
  function options_summary(&$categories, &$options) {
    parent::options_summary($categories, $options);
    unset($options['header']);
    unset($options['footer']);
    unset($options['empty']);
    unset($options['exposed_block']);
    unset($options['analyze-theme']);
  }

}

Members