Detects services which are plugin managers.

@return
An array of service IDs of all the services which we detected to be plugin
managers.
168374
protected function getPluginManagerServices() {
    $container_builder = $this->containerBuilderGetter->getContainerBuilder();

    // Get the definitions of services from the container.
    $definitions = $container_builder->getDefinitions();

    // Filter them down to the ones that are plugin managers.
    $plugin_manager_service_ids = [];
    foreach ($definitions as $service_id => $definition) {
      // Skip any deprecated service.
      if ($definition->isDeprecated()) {
        continue;
      }

      // Assume that any service whose name is of the form plugin.manager.FOO
      // is a plugin type manager.
      if (strpos($service_id, 'plugin.manager.') === 0) {
        $plugin_manager_service_ids[] = $service_id;

        continue;
      }

      // Skip the entity type manager: these don't behave at all like normal
      // plugins.
      if ($service_id == 'entity_type.manager') {
        continue;
      }

      // Find any plugin managers which don't conform to the pattern for the
      // service name, but do inherit from the DefaultPluginManager class.
      $service_class = $definition->getClass();
      if (is_subclass_of($service_class, \Drupal\Core\Plugin\DefaultPluginManager::class)) {
        $plugin_manager_service_ids[] = $service_id;
      }
    }

    // Filter out a blacklist of known broken plugin types.
    $plugin_manager_service_ids = array_diff($plugin_manager_service_ids, [
      // https://www.drupal.org/project/ctools/issues/2938586
      'plugin.manager.ctools.relationship',
    ]);

    //drush_print_r($plugin_manager_service_ids);

    // Developer trapdoor: just process the block plugin type, to make terminal
    // debug output easier to read through.
    //$plugin_manager_service_ids = array('plugin.manager.block');

    return $plugin_manager_service_ids;
  }
789553
public String[] getIds() {
        String[] ids = new String[recomms.length];
        for(int i = 0; i< recomms.length; i++)
            ids[i] = recomms[i].getId();
        return ids;
    }
1243404
@Override
  @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
  public List<ServerServiceDefinition> getServices() {
    return Collections.unmodifiableList(new ArrayList<>(services.values()));
  }
614101
public function getConfig()
    {
        return [
            'service_manager'    => [
                'aliases'   => [
                    'ModuleRouteListener' => ModuleRouteListener::class
                ],
                'factories' => [
                    ModuleRouteListener::class                   => InvokableFactory::class,
                    Listener\ApplicationBootstrapListener::class => InvokableFactory::class,
                    Listener\ErrorLoggerListener::class          => InvokableFactory::class,
                    Listener\RouteTrailingSlashListener::class   => InvokableFactory::class,
                    Listener\SetupRouterBaseUrl::class           => InvokableFactory::class
                ]
            ],
            'controller_plugins' => [
                'aliases'   => [
                    'config'    => Controller\Plugin\Config::class,
                    'Config'    => Controller\Plugin\Config::class,
                    'flashdata' => Controller\Plugin\FlashData::class,
                    'flashData' => Controller\Plugin\FlashData::class,
                    'FlashData' => Controller\Plugin\FlashData::class,
                    'htmlclass' => Controller\Plugin\HtmlClass::class,
                    'htmlClass' => Controller\Plugin\HtmlClass::class,
                    'HtmlClass' => Controller\Plugin\HtmlClass::class,
                    'log'       => Controller\Plugin\Log::class,
                    'Log'       => Controller\Plugin\Log::class,
                    'redirect'  => Controller\Plugin\Redirect::class,
                    'Redirect'  => Controller\Plugin\Redirect::class,
                    'headtitle' => Controller\Plugin\Title::class,
                    'headTitle' => Controller\Plugin\Title::class,
                    'HeadTitle' => Controller\Plugin\Title::class,
                    'title'     => Controller\Plugin\Title::class,
                    'Title'     => Controller\Plugin\Title::class,
                    'url'       => Controller\Plugin\Url::class,
                    'Url'       => Controller\Plugin\Url::class
                ],
                'factories' => [
                    Controller\Plugin\Config::class    => function(ContainerInterface $container) {
                        return new  Controller\Plugin\Config($container->get('Config'));
                    },
                    Controller\Plugin\FlashData::class => InvokableFactory::class,
                    Controller\Plugin\HtmlClass::class => InvokableFactory::class,
                    Controller\Plugin\Log::class       => InvokableFactory::class,
                    Controller\Plugin\Redirect::class  => InvokableFactory::class,
                    Controller\Plugin\Title::class     => InvokableFactory::class,
                    Controller\Plugin\Url::class       => InvokableFactory::class
                ]
            ],
            'listeners'          => [
                ModuleRouteListener::class                 => ModuleRouteListener::class,
                Listener\ErrorLoggerListener::class        => Listener\ErrorLoggerListener::class,
                Listener\RouteTrailingSlashListener::class => Listener\RouteTrailingSlashListener::class,
                Listener\SetupRouterBaseUrl::class         => Listener\RouteTrailingSlashListener::class
            ]
        ];
    }
873904
@Override
    public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses() {

        if (client || tribeNodeClient || disabled || sslOnly) {
            return Collections.emptyList();
        }

        final List<Class<? extends LifecycleComponent>> services = new ArrayList<>(1);
        services.add(GuiceHolder.class);
        return services;
    }
904502
@Exported
    public List<Plugin> getAvailables() {
        List<Plugin> r = new ArrayList<>();
        Data data = getData();
        if(data==null)     return Collections.emptyList();
        for (Plugin p : data.plugins.values()) {
            if(p.getInstalled()==null)
                r.add(p);
        }
        return r;
    }
971941
private InstalledPlugin[] listInstalledPlugins() {
    Profiler profiler = Profiler.create(LOG).startInfo("Load plugins index");
    GetRequest getRequest = new GetRequest(PLUGINS_WS_URL);
    InstalledPlugins installedPlugins;
    try (Reader reader = wsClient.call(getRequest).contentReader()) {
      installedPlugins = new Gson().fromJson(reader, InstalledPlugins.class);
    } catch (Exception e) {
      throw new IllegalStateException("Fail to parse response of " + PLUGINS_WS_URL, e);
    }

    profiler.stopInfo();
    return installedPlugins.plugins;
  }
634437
@RequestMapping(value = "/api/plugins", method = RequestMethod.GET)
    public
    @ResponseBody
    HashMap<String, Object> getPluginInformation() {
        return pluginInformation();
    }
932452
public function getServices()
    {
        return [
            self::INFLECTOR           => function () { return Inflector::get('en');},
            self::APPLICATION_RUNTIME => function () { return new ApplicationRuntime();},
            self::CONFIG_FACTORY      => function () { return new ConfigFactory();}
        ];
    }
878030
public static function get_enabled_plugins() {
        global $CFG;

        if (empty($CFG->enablewebservices) or empty($CFG->webserviceprotocols)) {
            return array();
        }

        $enabled = array();
        foreach (explode(',', $CFG->webserviceprotocols) as $protocol) {
            $enabled[$protocol] = $protocol;
        }

        return $enabled;
    }
994874
public List<MoskitoPlugin> getPlugins() {
		ArrayList<MoskitoPlugin> ret = new ArrayList<MoskitoPlugin>(plugins.values());
		return ret;
	}
1234310
public JServiceMethod[] methods() {
        List<CServiceMethod> methods = new ArrayList<>(service.getMethodsIncludingExtended());

        CServiceMethod[] ma = methods.toArray(new CServiceMethod[methods.size()]);
        JServiceMethod[] ret = new JServiceMethod[ma.length];
        for (int i = 0; i < methods.size(); ++i) {
            ret[i] = new JServiceMethod(service, ma[i], helper);
        }
        return ret;
    }
539338
public function plugins()
    {
        // plugins is a list of arrays, activate on a per plugin base
        if (is_array($this->plugins)) {
            return $this->plugins;
        }

        // for anything the evaluates to true, activate all plugins
        if ($this->plugins) {
            $plugins = apply_filters('all_plugins', get_plugins());

            return array_keys($plugins);
        }

        return [];
    }
753261
public function getServices()
	{
		$services = false;
		if (!empty($this->cache) && Yii::$app->has($this->cache)) {
			/** @var $cache \yii\caching\Cache */
			$cache = Yii::$app->get($this->cache);
			$services = $cache->get('EAuth.services');
		}

		if (false === $services || !is_array($services)) {
			$services = [];
			foreach ($this->services as $service => $options) {
				/** @var $class ServiceBase */
				$class = $this->getIdentity($service);
				$services[$service] = (object)[
					'id' => $class->getServiceName(),
					'title' => $class->getServiceTitle(),
					'type' => $class->getServiceType(),
					'jsArguments' => $class->getJsArguments(),
				];
			}
			if (isset($cache)) {
				$cache->set('EAuth.services', $services, $this->cacheExpire);
			}
		}
		return $services;
	}
96994
private Set<Artifact> getProjectPluginManagement() {
        Set<Artifact> result = new LinkedHashSet<Artifact>();
        PluginManagement pluginManagement = getProject().getPluginManagement();
        if (pluginManagement != null) {
            for (Plugin plugin : pluginManagement.getPlugins()) {
                result.add(toArtifact(plugin));
            }
        }
        return result;
    }
880692
public function getServiceInstances()
    {
        $instances = [];

        foreach ($this->getServices() as $name => $info) {
            if (!isset($info['type'])) {
                continue;
            }
            $type = $info['type'];
            unset($info['type']);

            $instances[$name] = [
                'type' => $type,
                'options' => $info,
                'instance' => static::loadService($this, $type, $name),
            ];
        }

        return $instances;
    }
1248460
protected function getMissingEntities()
    {
        $modes = $this->getAllModes();
        $entrySubtypes = $this->getEntrySubtypes();
        
        $classes = array();
        foreach ($entrySubtypes as $service => $subtypes) {
            foreach ($modes as $mode) {
                foreach ($subtypes as $subtype) {
                    $classes[] = sprintf(
                        self::MODE_PATTERN,
                        $service,
                        $mode,
                        $service . $subtype . $mode
                    );
                }
            }
        }
        
        return $this->getMissingClasses($classes);
    }