You are here

public function RegionMap::getNonEmptyRegionNames in Layout Plugin Views 8

Same name and namespace in other branches
  1. 8.2 src/RegionMap.php \Drupal\layout_plugin_views\RegionMap::getNonEmptyRegionNames()

Retrieves an array of region machine names for all regions that contain fields to be rendered.

Return value

array

File

src/RegionMap.php, line 80

Class

RegionMap

Namespace

Drupal\layout_plugin_views

Code

public function getNonEmptyRegionNames() {
  $non_empty = [];
  foreach ($this->map as $region => $fields) {
    if (!empty($fields)) {
      $non_empty[] = $region;
    }
  }
  return $non_empty;
}