You are here

public function IpGeoLocViewsPluginStyle::pluginStyleDecorate in IP Geolocation Views & Maps 8

Pending doc.

1 call to IpGeoLocViewsPluginStyle::pluginStyleDecorate()
IpGeoLocViewsPluginStyle::pluginStyleExtractLocations in src/Services/IpGeoLocViewsPluginStyle.php
Extract an array of locations from the supplied views_plugin_style.

File

src/Services/IpGeoLocViewsPluginStyle.php, line 1059

Class

IpGeoLocViewsPluginStyle
Class IpGeoLocViewsPluginStyle.

Namespace

Drupal\ip_geoloc\Services

Code

public function pluginStyleDecorate(&$location, $row, $tooltip_field, $tag_field) {
  if ($tooltip_field) {
    $tooltip = $tooltip_field
      ->theme($row);
    $location->marker_tooltip = strip_tags($this
      ->pluginStyleAddLabel($tooltip_field, $tooltip));
  }
  if ($tag_field) {
    $tag = $tag_field
      ->theme($row);
    $location->marker_tag = $this
      ->pluginStyleAddLabelAndStyling($tag_field, $tag);
  }
  if (isset($row->nid)) {
    $location->id = $row->nid;
  }
  elseif (isset($row->tid)) {
    $location->id = $row->tid;
  }
}