protected function buildRootSelector($selectedLocation = null)
{
$selectedOption = !is_null($selectedLocation) ? $selectedLocation->getId() : null;
$rootLocations = $this->locationProvider->getRootLocations();
if (empty($rootLocations)) {
throw new \RuntimeException('No locations loaded, please populate your locations');
}
$locationExample = reset($rootLocations);
$this->selects[] = $this->formatSelector($locationExample->getType(), $this->generateOptions($rootLocations), $selectedOption);
}