You are here

function leaflet_views_plugin_style::getEntityInfoByTable in Leaflet 7

Gets entity information based on the entity table passed in.

Parameters

string $table: Table name.

Return value

array Returns the entity_info array.

1 call to leaflet_views_plugin_style::getEntityInfoByTable()
leaflet_views_plugin_style::init in leaflet_views/leaflet_views_plugin_style.inc
If this view is displaying an entity, save the entity type and info.

File

leaflet_views/leaflet_views_plugin_style.inc, line 38
Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Class

leaflet_views_plugin_style
@file Extension of the Views Plugin Style for Leaflet Map Adapted from the GeoField Map views module and the OpenLayers Views module.

Code

function getEntityInfoByTable($table) {
  $info = entity_get_info();
  foreach ($info as $entity_type => &$entity_info) {
    if ($entity_info['base table'] == $table) {
      $entity_info['entity type'] = $entity_type;
      return $entity_info;
    }
  }
  return array();
}