public function HelperService::getPlacesInUse in Weather 8
Same name and namespace in other branches
- 2.0.x src/Service/HelperService.php \Drupal\weather\Service\HelperService::getPlacesInUse()
Get all currently used places for a display.
Parameters
string $display_type: Display type.
int $display_number: Display number.
Return value
array Array of sorted places.
File
- src/
Service/ HelperService.php, line 173
Class
- HelperService
- HelperService service.
Namespace
Drupal\weather\ServiceCode
public function getPlacesInUse($display_type, $display_number) {
$result = $this->weatherDisplayPlaceStorage
->getQuery()
->condition('display_type', $display_type)
->condition('display_number', $display_number)
->sort('weight', 'ASC')
->sort('displayed_name', 'ASC')
->execute();
if ($result) {
$result = $this->weatherDisplayPlaceStorage
->loadMultiple($result);
}
return $result;
}