@param Link[] $pluginRequirements

@return Link[]
2637
private function checkComposerDependencies(
        array $pluginRequirements,
        RequirementExceptionStack $exceptionStack,
        Composer $pluginComposer
    ): array {
        $packages = $pluginComposer->getRepositoryManager()->getLocalRepository()->getPackages();
        foreach ($packages as $package) {
            $pluginRequirements = $this->checkRequirement(
                $pluginRequirements,
                $package->getName(),
                $package->getVersion(),
                $exceptionStack
            );
        }

        return $pluginRequirements;
    }
301693
private function getExistingPlugins()
    {
        $pluginsIndexed = [];
        $plugins = $this
            ->pluginRepository
            ->findAll();

        /**
         * @var Plugin $plugin
         */
        foreach ($plugins as $plugin) {
            $pluginNamespace = $plugin->getNamespace();
            $pluginsIndexed[$pluginNamespace] = $plugin;
        }

        return $pluginsIndexed;
    }
609912
public function getPluginNodesWithViewDefinitions(ContentContext $context)
    {
        $pluginNodes = [];
        foreach ($this->getPluginNodes($context) as $pluginNode) {
            /** @var NodeInterface $pluginNode */
            if ($this->getPluginViewDefinitionsByPluginNodeType($pluginNode->getNodeType()) !== []) {
                $pluginNodes[] = $pluginNode;
            }
        }
        return $pluginNodes;
    }
935806
public function requiresPlugins()
    {
        $has     = class_uses_recursive(get_called_class());
        $check   = array_combine(func_get_args(), func_get_args());
        $missing = array_values(array_diff($check, $has));
        if (isset($missing[ 0 ])) {
            $plugin = collect(debug_backtrace())->where('function', 'requiresPlugins')->first();
            throw ProviderPluginDependencyException::plugin($plugin[ 'file' ], implode(', ', $missing));
        }
    }
263277
private function checkRequirement(
        array $pluginRequirements,
        string $installedName,
        string $installedVersion,
        RequirementExceptionStack $exceptionStack
    ): array {
        if (isset($pluginRequirements[$installedName])) {
            $constraint = $pluginRequirements[$installedName]->getConstraint();
            if ($constraint === null) {
                return $pluginRequirements;
            }

            if ($constraint->matches(new Constraint('==', $installedVersion)) === false) {
                $exceptionStack->add(
                    new VersionMismatchException($installedName, $constraint->getPrettyString(), $installedVersion)
                );
            }

            unset($pluginRequirements[$installedName]);
        }

        return $pluginRequirements;
    }
334688
protected function addRequirements()
    {
        // Javascript to customize the grid field for the DMS document (overriding entwine
        // in FRAMEWORK_DIR.'/javascript/GridField.js'
        Requirements::javascript(DMS_DIR . '/javascript/DMSGridField.js');
        Requirements::css(DMS_DIR . '/dist/css/dmsbundle.css');

        // Javascript for the link editor pop-up in TinyMCE
        Requirements::javascript(DMS_DIR . '/javascript/DocumentHtmlEditorFieldToolbar.js');

        return $this;
    }
951007
public java.util.List<com.google.javascript.jscomp.Requirement> getRequirementList() {
    return requirement_;
  }
1167321
protected function getData($pluginVector)
    {
        if (!$pluginVector) {
            return [];
        }

        $pluginCode = $pluginVector->pluginCodeObj->toCode();

        if (!$pluginCode) {
            return [];
        }

        $tables = $this->getTableList($pluginCode);
        $searchTerm = Str::lower($this->getSearchTerm());

        // Apply the search
        //
        if (strlen($searchTerm)) {
            $words = explode(' ', $searchTerm);
            $result = [];

            foreach ($tables as $table) {
                if ($this->textMatchesSearch($words, $table)) {
                    $result[] = $table;
                }
            }

            $tables = $result;
        }

        return $tables;
    }
512276
public function resolveRequirements(Plugin $plugin, $moodleVersion)
    {
        $map = [
            'auth'       => new AuthRequirements($plugin, $moodleVersion),
            'block'      => new BlockRequirements($plugin, $moodleVersion),
            'filter'     => new FilterRequirements($plugin, $moodleVersion),
            'format'     => new FormatRequirements($plugin, $moodleVersion),
            'mod'        => new ModuleRequirements($plugin, $moodleVersion),
            'qtype'      => new QuestionRequirements($plugin, $moodleVersion),
            'repository' => new RepositoryRequirements($plugin, $moodleVersion),
            'theme'      => new ThemeRequirements($plugin, $moodleVersion),
        ];

        if (array_key_exists($plugin->type, $map)) {
            return $map[$plugin->type];
        }

        return new GenericRequirements($plugin, $moodleVersion);
    }
481938
private function installRequires(Request $request, array $links, $dev = false)
    {
        foreach ($links as $link) {
            $this->logger->info($dev
                ? "Adding dev dependency <comment>{$link}</comment>"
                : "Adding dependency <comment>{$link}</comment>"
            );
            $request->install($link->getTarget(), $link->getConstraint());
        }
    }
910920
public function getRequiredJSFiles()
    {
        $files = [];
        
        foreach (ClassInfo::subclassesFor(ContentController::class) as $controller) {
            
            if ($required_js = Injector::inst()->get($controller)->getRequiredJS()) {
                
                foreach ($required_js as $file) {
                    
                    $file = ModuleResourceLoader::singleton()->resolvePath($file);
                    
                    if (!isset($files[$file])) {
                        $files[$file] = file_get_contents(Director::getAbsFile($file));
                    }
                    
                }
                
            }
            
        }
        
        return $files;
    }
977333
public function getDependencies($plugin)
    {
        if (is_string($plugin) && (!$plugin = $this->findByIdentifier($plugin))) {
            return false;
        }

        if (!isset($plugin->require) || !$plugin->require) {
            return null;
        }

        return is_array($plugin->require) ? $plugin->require : [$plugin->require];
    }
539395
public function getCurrentModuleDependencies($recursive = false)
    {
        if (empty($this->moduleDescriptor->required)) {
            return [];
        }

        $dependencies = [];
        foreach ($this->moduleDescriptor->required->module as $dependency) {
            $dependencyArray = [
                "code" => (string)$dependency,
                "version" => (string)$dependency['version'],
            ];
            if (!\in_array($dependencyArray, $dependencies)) {
                $dependencies[] = $dependencyArray;
            }

            if ($recursive) {
                $recursiveModuleValidator = new ModuleValidator(THELIA_MODULE_DIR . '/' . (string)$dependency);
                array_merge(
                    $dependencies,
                    $recursiveModuleValidator->getCurrentModuleDependencies(true)
                );
            }
        }

        return $dependencies;
    }
1027200
private function getAdditionalLinks($locale)
    {
        $return = [];
        $additional_links = $this->container->getParameter('networking_init_cms.xml_sitemap.additional_links');
        foreach ($additional_links as $links) {
            if ($links['locale'] == $locale) {
                return $links['links'];
            }
        }

        return $return;
    }
600194
private function validateComposerPackages(
        array $pluginRequirements,
        RequirementExceptionStack $exceptionStack
    ): array {
        $shopwareProjectComposer = $this->getComposer($this->projectDir);
        $pluginRequirements = $this->checkComposerDependencies(
            $pluginRequirements,
            $exceptionStack,
            $shopwareProjectComposer
        );

        return $pluginRequirements;
    }
797207
public function loadPlugins($plugins)
	{
		foreach($plugins as $plugin) {
			$pluginClass = str_replace(':','\\',$plugin);

			$this->plugins[] = new $pluginClass($this->core);
		}
	}
956014
public static function get_plugin_list($plugintype) {
        self::init();

        if (!isset(self::$plugins[$plugintype])) {
            return array();
        }
        return self::$plugins[$plugintype];
    }