public function getRegions($themeName)
    {
        $translator = $this->getTranslator();
        $options = $this->getModuleOptions();
        $theme = $options->getThemeByName($themeName);
        $map = [];

        if (! isset($theme['frontend']['regions'])
            || ! is_array($theme['frontend']['regions'])
            || empty($theme['frontend']['regions'])
        ) {
            return $map;
        }
        $regions = $theme['frontend']['regions'];
        $widgets = array_keys($options->getWidgets());

        foreach ($regions as $regionName => $regionOptions) {
            if (isset($regionOptions['contains'])
                && is_array($regionOptions['contains'])
            ) {
                $container = $regionOptions['contains'];
                foreach ($container as $widget) {
                    $map[$widget] = $regionName;
                }
            }
        }
        foreach ($widgets as $widget) {
            if (! array_key_exists($widget, $map)) {
                $map[$widget] = 'none';
            }
        }
        return $map;
    }