You are here

function getlocations_plugin_style_map::init in Get Locations 7

Same name and namespace in other branches
  1. 7.2 views/getlocations_plugin_style_map.inc \getlocations_plugin_style_map::init()

If this view is displaying an entity, save the entity type and info.

Overrides views_plugin_style::init

File

views/getlocations_plugin_style_map.inc, line 22
getlocations_plugin_style_map.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Class

getlocations_plugin_style_map
Getlocations style plugin to render rows as icons on a map.

Code

function init(&$view, &$display, $options = NULL) {
  parent::init($view, $display, $options);
  foreach (entity_get_info() as $key => $info) {
    if ($view->base_table == $info['base table']) {
      $this->entity_type = $key;
      $this->entity_info = $info;
      break;
    }
  }
}