You are here

function getlocations_mapquest_plugin_style::init in Get Locations 7

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

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

Overrides views_plugin_style::init

File

modules/getlocations_mapquest/views/getlocations_mapquest_plugin_style.inc, line 17
getlocations_mapquest_plugin_style.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Class

getlocations_mapquest_plugin_style
@file getlocations_mapquest_plugin_style.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

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;
    }
  }
}