protected function GeofieldGoogleMapViewStyle::getEntitySourceEntityInfo in Geofield Map 8.2
Get the entity info of the entity source.
Parameters
string $source: The Source identifier.
Return value
\Drupal\Core\Entity\EntityTypeInterface The entity type.
1 call to GeofieldGoogleMapViewStyle::getEntitySourceEntityInfo()
- GeofieldGoogleMapViewStyle::buildOptionsForm in src/
Plugin/ views/ style/ GeofieldGoogleMapViewStyle.php - Provide a form to edit options for this plugin.
File
- src/
Plugin/ views/ style/ GeofieldGoogleMapViewStyle.php, line 474
Class
- GeofieldGoogleMapViewStyle
- Style plugin to render a View output as a Leaflet map.
Namespace
Drupal\geofield_map\Plugin\views\styleCode
protected function getEntitySourceEntityInfo($source) {
if (!empty($source) && $source != '__base_table') {
$handler = $this->displayHandler
->getHandler('relationship', $source);
$data = Views::viewsData();
if (($table = $data
->get($handler->definition['base'])) && !empty($table['table']['entity type'])) {
try {
return $this->entityManager
->getDefinition($table['table']['entity type']);
} catch (\Exception $e) {
watchdog_exception('geofield_map', $e);
}
}
}
return $this->view
->getBaseEntityType();
}