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;
    }
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;
    }
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 ; }
Enable a certain plugin.

@param PluginDescription $plugin
@param $title
@param $mode
@param $script
@param Map $map

@return mixed

@throws \eXpansion\Framework\Core\Exceptions\DataProvider\UncompatibleException
Enable a certain plugin .