public function GeolocationGpx::isViewsGeoOption in Geolocation Field 8.3
Determine valid views option.
Parameters
\Drupal\views\Plugin\views\field\FieldPluginBase $views_field: Views field definition.
Return value
bool Yes or no.
Overrides DataProviderBase::isViewsGeoOption
File
- modules/
geolocation_gpx/ src/ Plugin/ geolocation/ DataProvider/ GeolocationGpx.php, line 47
Class
- GeolocationGpx
- Provides GPX.
Namespace
Drupal\geolocation_gpx\Plugin\geolocation\DataProviderCode
public function isViewsGeoOption(FieldPluginBase $views_field) {
if ($views_field instanceof EntityField && $views_field
->getPluginId() == 'field') {
$field_storage_definitions = $this->entityFieldManager
->getFieldStorageDefinitions($views_field
->getEntityType());
if (!empty($field_storage_definitions[$views_field->field])) {
$field_storage_definition = $field_storage_definitions[$views_field->field];
if ($field_storage_definition
->getType() == 'geolocation_gpx_file') {
return TRUE;
}
}
}
return FALSE;
}