public function registerPlugin($provider, $pluginId, $title, $mode, $script, Map $map)
    {
        $providerId = $this->getCompatibleProviderId($provider, $title, $mode, $script, $map);

        if (empty($providerId)) {
            return;
        }

        /** @var AbstractDataProvider $providerService */
        $providerService = $this->container->get($providerId);
        $pluginService = $this->container->get($pluginId);
        $interface = $this->providerInterfaces[$provider];

        if ($pluginService instanceof $interface) {
            $this->deletePlugin($provider, $pluginId);
            $providerService->registerPlugin($pluginId, $pluginService);
        } else {
            throw new UncompatibleException("Plugin $pluginId isn't compatible with $provider. Should be instance of $interface");
        }

        $this->logger->info("Plugin '$pluginId' will use data provider '$provider' : '$providerId'");
    }
public function registerPlugin($provider, $pluginId, $title, $mode, $script, Map $map)
    {
        $providerId = $this->getCompatibleProviderId($provider, $title, $mode, $script, $map);

        if (empty($providerId)) {
            return;
        }

        /** @var AbstractDataProvider $providerService */
        $providerService = $this->container->get($providerId);
        $pluginService = $this->container->get($pluginId);
        $interface = $this->providerInterfaces[$provider];

        if ($pluginService instanceof $interface) {
            $this->deletePlugin($provider, $pluginId);
            $providerService->registerPlugin($pluginId, $pluginService);
        } else {
            throw new UncompatibleException("Plugin $pluginId isn't compatible with $provider. Should be instance of $interface");
        }

        $this->logger->info("Plugin '$pluginId' will use data provider '$provider' : '$providerId'");
    }
public function registerPlugin ( $ provider , $ pluginId , $ title , $ mode , $ script , Map $ map ) { $ providerId = $ this -> getCompatibleProviderId ( $ provider , $ title , $ mode , $ script , $ map ) ; if ( empty ( $ providerId ) ) { return ; } /** @var AbstractDataProvider $providerService */ $ providerService = $ this -> container -> get ( $ providerId ) ; $ pluginService = $ this -> container -> get ( $ pluginId ) ; $ interface = $ this -> providerInterfaces [ $ provider ] ; if ( $ pluginService instanceof $ interface ) { $ this -> deletePlugin ( $ provider , $ pluginId ) ; $ providerService -> registerPlugin ( $ pluginId , $ pluginService ) ; } else { throw new UncompatibleException ( "Plugin $pluginId isn't compatible with $provider. Should be instance of $interface" ) ; } $ this -> logger -> info ( "Plugin '$pluginId' will use data provider '$provider' : '$providerId'" ) ; }
Register a plugin to the DataProviders.

@param string $provider The provider to register the plugin to.
@param string $pluginId The id of the plugin to be registered.
@param string $title The title to register it for.
@param string $mode The mode to register it for.
@param string $script The script to register it for.
@param Map    $map Current map

@throws UncompatibleException
Register a plugin to the DataProviders .