protected function getHierarchy($locationId) { try { $hierarchy = $this->locationProvider->getHierarchy($locationId); } catch (EntityNotFoundException $e) { $hierarchy = []; } return $hierarchy; }