You are here

public function DataProviderBase::getLocationsFromViewsRow in Geolocation Field 8.3

Get locations from views row.

Parameters

\Drupal\views\ResultRow $row: Row.

\Drupal\views\Plugin\views\field\FieldPluginBase $views_field: Views field definition.

Return value

array Renderable locations.

Overrides DataProviderInterface::getLocationsFromViewsRow

1 call to DataProviderBase::getLocationsFromViewsRow()
GeolocationGeometry::getLocationsFromViewsRow in modules/geolocation_geometry/src/Plugin/geolocation/DataProvider/GeolocationGeometry.php
Get locations from views row.
1 method overrides DataProviderBase::getLocationsFromViewsRow()
GeolocationGeometry::getLocationsFromViewsRow in modules/geolocation_geometry/src/Plugin/geolocation/DataProvider/GeolocationGeometry.php
Get locations from views row.

File

src/DataProviderBase.php, line 230

Class

DataProviderBase
Class DataProviderBase.

Namespace

Drupal\geolocation

Code

public function getLocationsFromViewsRow(ResultRow $row, FieldPluginBase $viewsField = NULL) {
  $positions = [];
  foreach ($this
    ->getFieldItemsFromViewsRow($row, $viewsField) as $item) {
    $positions = array_merge($this
      ->getLocationsFromItem($item), $positions);
  }
  return $positions;
}