protected function enablePlugin(PluginDescription $plugin, $title, $mode, $script, Map $map)
    {
        $notify = false;
        $plugin->setIsEnabled(true);
        $pluginService = $this->container->get($plugin->getPluginId());

        if (!isset($this->enabledPlugins[$plugin->getPluginId()])) {
            $notify = true;
        }

        foreach ($plugin->getDataProviders() as $provider) {
            $dataProviders = explode("|", $provider);
            foreach ($dataProviders as $dataProvider) {
                $this->dataProviderManager->registerPlugin($dataProvider, $plugin->getPluginId(), $title, $mode, $script, $map);
            }
        }

        $this->enabledPlugins[$plugin->getPluginId()] = $plugin;

        return $notify ? $pluginService : null;
    }