You are here

public function LeafletService::multipleEmpty in Leaflet 2.1.x

Same name and namespace in other branches
  1. 8 src/LeafletService.php \Drupal\leaflet\LeafletService::multipleEmpty()
  2. 2.0.x src/LeafletService.php \Drupal\leaflet\LeafletService::multipleEmpty()

Check if an array has all values empty.

Parameters

array $array: The array to check.

Return value

bool The bool result.

File

src/LeafletService.php, line 387

Class

LeafletService
Provides a LeafletService class.

Namespace

Drupal\leaflet

Code

public function multipleEmpty(array $array) {
  foreach ($array as $value) {
    if (empty($value)) {
      continue;
    }
    else {
      return FALSE;
    }
  }
  return TRUE;
}