public function HelperService::getPlacesInUse in Weather 2.0.x
Same name and namespace in other branches
- 8 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 176
Class
- HelperService
- Some small helper functions.
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;
}