protected function setThemeNameSelectorOptions()
    {
        $elementUri = tao_helpers_Uri::encode(DeliveryThemeDetailsProvider::DELIVERY_THEME_ID_URI);
        if (!$this->form->hasElement($elementUri)) {
            return false;
        }

        /** @var ThemeService $themeService */
        $themeService = ServiceManager::getServiceManager()->get(ThemeService::SERVICE_ID);
        $allThemes    = $themeService->getAllThemes();
        $options      = [];
        foreach ($allThemes as $currentThemeId => $currentTheme) {
            $options[$currentThemeId] = $currentThemeId;
            if (method_exists($currentTheme, 'getLabel')) {
                $options[$currentThemeId] = $currentTheme->getLabel();
            }
        }

        $this->form->getElement($elementUri)->setOptions($options);

        return true;
    }