You are here

protected function MapThemerBase::getMapThemerEntityBundles in Geofield Map 8.2

Gets the Map Themer Entity Bundles, based on the View Style Entity Type.

Parameters

\Drupal\geofield_map\Plugin\views\style\GeofieldGoogleMapViewStyle $geofieldMapView: The Geofield Map View.

string $entity_type: The entity type.

array $entity_bundles: The entity bundles.

Return value

array The eventually filtered Entity Bundles for the the Map Themer.

4 calls to MapThemerBase::getMapThemerEntityBundles()
EntityTypeThemer::buildMapThemerElement in src/Plugin/GeofieldMapThemer/EntityTypeThemer.php
Provides a Map Themer Options Element.
EntityTypeThemerUrl::buildMapThemerElement in src/Plugin/GeofieldMapThemer/EntityTypeThemerUrl.php
Provides a Map Themer Options Element.
TaxonomyTermThemer::buildMapThemerElement in src/Plugin/GeofieldMapThemer/TaxonomyTermThemer.php
Provides a Map Themer Options Element.
TaxonomyTermThemerUrl::buildMapThemerElement in src/Plugin/GeofieldMapThemer/TaxonomyTermThemerUrl.php
Provides a Map Themer Options Element.

File

src/MapThemerBase.php, line 243

Class

MapThemerBase
A base class for MapThemer plugins.

Namespace

Drupal\geofield_map

Code

protected function getMapThemerEntityBundles(GeofieldGoogleMapViewStyle $geofieldMapView, $entity_type, array $entity_bundles) : array {
  $view_bundles = $entity_type instanceof ViewEntityType && $geofieldMapView
    ->getViewEntityType() == $entity_type
    ->id() && !empty($geofieldMapView
    ->getViewFilteredBundles()) ? $geofieldMapView
    ->getViewFilteredBundles() : array_keys($entity_bundles);
  return $view_bundles;
}