Resolve dependants

@return Module[]
516474
protected function resolveDependants(): array
    {
        $dependants = [];
        $modules = $this->manager->modules();

        foreach ($modules as $name => $module) {
            if ($name === $this->name) {
                continue;
            }
            $dependencies = $module->dependencies();
            if (isset($dependencies[$this->name])) {
                $dependants[$name] = $module;
            }
        }

        return $dependants;
    }
932994
public function getDependencies()
    {
        if (empty($this->dependencies)) {
            foreach ($this->getManifest()->getDependencies() as $id => $version) {
                $this->dependencies[$id] = $version;
                $dependence = $this->getExtensionManager()->getExtensionById($id);
                $this->dependencies = array_merge($this->dependencies, $dependence->getDependencies());
            }
        }
        return $this->dependencies;
    }
600088
private function dependencyDefs()
    {
        return [
            Logger::class => function () {
                $level = $this->getCfgValue('deasilworks.log.level', 10);

                $gelfHandler = new GelfHandler(
                    new Publisher(
                        new UdpTransport(
                            $this->getCfgValue('deasilworks.log.host', '4klift-graylog'),
                            $this->getCfgValue('deasilworks.log.port', 12201)
                        )
                    ),
                    $level
                );

                $nullHandler = new NullHandler($level);

                $logger = new Logger($this->getCfgValue('deasilworks.log.name', '4klift'));

                $wfgh = new WhatFailureGroupHandler([
                    $gelfHandler,
                    $nullHandler,
                ]);

                $logger->pushHandler($wfgh);

                return $logger;
            },
            CFG::class => function () {
                return $this->config->getCfg();
            },
        ];
    }
1028139
public function getImportsWithDependencies (array $imports)
    {
        $toLoad = [];

        foreach ($imports as $import)
        {
            $dependencies = $this->map[$import] ?? null;

            if (null !== $dependencies)
            {
                foreach ($dependencies as $dependency)
                {
                    $toLoad[$dependency] = true;
                }
            }
            else
            {
                $toLoad[$import] = true;
            }
        }

        return \array_keys($toLoad);
    }
1036036
protected function getDependencies()
    {
        return [
            'factories' => [
                PermissionMiddleware::class => PermissionMiddlewareFactory::class,
                ExpressiveRouteName::class => InvokableFactory::class,
                PermissionMiddleware::class => PermissionMiddlewareFactory::class,
                ResourceResolver::class => ResourceResolverAbstractFactory::class,
                RoleResolver::class => RoleResolverFactory::class,
                AclMiddleware::class => AclMiddlewareFactory::class,
                Acl::class => AclFromDataStoreFactory::class,
                UserRepository::class => UserRepositoryFactory::class,
                GuestAuthentication::class => GuestAuthenticationFactory::class,
                RedirectMiddleware::class => RedirectMiddlewareFactory::class,
                GoogleClient::class => GoogleClientFactory::class,
            ],
            'aliases' => [
                ConfigProvider::AUTHENTICATION_MIDDLEWARE_SERVICE => AuthenticationMiddleware::class,
                AuthenticationInterface::class => 'authenticationServiceChain',
                UserRepositoryInterface::class => UserRepository::class,

                self::RULE_DATASTORE_SERVICE => AclRulesTable::class,
                self::ROLE_DATASTORE_SERVICE => AclRolesTable::class,
                self::RESOURCE_DATASTORE_SERVICE => AclResourceTable::class,
                self::PRIVILEGE_DATASTORE_SERVICE => AclPrivilegeTable::class,
                self::USER_DATASTORE_SERVICE => AclUsersTable::class,
                self::USER_ROLE_DATASTORE_SERVICE => AclUserRolesTable::class,
            ],
            'abstract_factories' => [
                ResourceResolverAbstractFactory::class,
                RouteAttributeAbstractFactory::class,
                RouteNameAbstractFactory::class,
                MiddlewarePipeAbstractFactory::class,
                AuthenticationChainAbstractFactory::class,
                BasicAccessAbstractFactory::class,
                PhpSessionAbstractFactory::class,
                CredentialMiddlewareAbstractFactory::class,
            ],
            'invokables' => [
                PrivilegeResolver::class => PrivilegeResolver::class,
                AccessForbiddenHandler::class => AccessForbiddenHandler::class,
                ExpressiveRouteName::class => ExpressiveRouteName::class,
            ],
        ];
    }
1222485
public function getDependencies()
    {
        $dependencies = [];
        if ($this->extendsClassDefinition && $this->extendsClassDefinition instanceof self) {
            $dependencies[] = $this->extendsClassDefinition;
        }

        foreach ($this->implementedInterfaceDefinitions as $interfaceDefinition) {
            if ($interfaceDefinition instanceof self) {
                $dependencies[] = $interfaceDefinition;
            }
        }

        return $dependencies;
    }
926814
protected static function getPatchedDependencyConstraints(RootPackageInterface $root_package) {
    $required = $root_package->getRequires();
    $extra = $root_package->getExtra();
    $patched = $extra['patches'];
    return array_intersect_key($required, $patched);
  }
1109301
public function getDependencies(): array
    {
        $dependencies = [];
        foreach ($this->config['dependencies'] as $dependency) {
            $dependencies[] = $this->wire($dependency);
        }

        return $dependencies;
    }
262252
public function resolve_dependencies() {
        if ($this->group) {
            // Default for when a group is selected.
            if ($this->attempts === null || $this->attempts == quiz_attempts_report::ALL_WITH) {
                $this->attempts = quiz_attempts_report::ENROLLED_WITH;
            }

        } else if (!$this->group && $this->course->id == SITEID) {
            // Force report on front page to show all, unless a group is selected.
            $this->attempts = quiz_attempts_report::ALL_WITH;

        } else if (!in_array($this->attempts, array(quiz_attempts_report::ALL_WITH, quiz_attempts_report::ENROLLED_WITH,
                quiz_attempts_report::ENROLLED_WITHOUT, quiz_attempts_report::ENROLLED_ALL))) {
            $this->attempts = quiz_attempts_report::ENROLLED_WITH;
        }

        $cleanstates = array();
        foreach (self::$statefields as $state) {
            if (in_array($state, $this->states)) {
                $cleanstates[] = $state;
            }
        }
        $this->states = $cleanstates;
        if (count($this->states) == count(self::$statefields)) {
            // If all states have been selected, then there is no constraint
            // required in the SQL, so clear the array.
            $this->states = null;
        }

        if (!quiz_report_can_filter_only_graded($this->quiz)) {
            // A grading mode like 'average' has been selected, so we cannot do
            // the show the attempt that gave the final grade thing.
            $this->onlygraded = false;
        }

        if ($this->attempts == quiz_attempts_report::ENROLLED_WITHOUT) {
            $this->states = null;
            $this->onlygraded = false;
        }

        if (!$this->is_showing_finished_attempts()) {
            $this->onlygraded = false;
        }

        if ($this->pagesize < 1) {
            $this->pagesize = quiz_attempts_report::DEFAULT_PAGE_SIZE;
        }
    }
131112
public function getDependencies($params)
    {
        $deps = [];
        foreach ($params as $param) {
            $dependency = $param->getClass();
            if ($dependency !== null) {
                if ($dependency->name == 'Proem\Service\AssetManager' || $dependency->name == 'Proem\Service\AssetManagerInterface') {
                    $deps[] = $this;
                } else {
                    $deps[] = $this->resolve($dependency->name);
                }
            } else {
                if ($param->isDefaultValueAvailable()) {
                    $deps[] = $param->getDefaultValue();
                }
            }
        }
        return $deps;
    }
233807
protected function get_dependency_array( $handle ) {
		foreach ( $this->dependencies as $type => $dependencies ) {
			if ( array_key_exists( $handle, $dependencies ) ) {
				return [ $type, $dependencies[ $handle ] ];
			}
		}
		// Handle not found, return an empty array.
		return [ '', null ];
	}
741768
protected function resolveDependencies()
    {
        $objectManager = $this->bootstrap->getObjectManager();
        $this->baseComponentChain = $objectManager->get(ComponentChain::class);
    }
1077385
private function addDependencyOperations() {
    $operations = [];

    foreach ($this->dependencies as $module => $type) {
      $operations[] = [
        [static::class, 'installDependency'],
        [
          $module,
          $type,
        ],
      ];
    }

    return $operations;
  }
503826
public function getDependencies()
    {
        $dependencies = array();

        $file = $this->getFilePath();
        if ($file) {
            $dependencies[] = $file;
        }

        foreach ($this->operations as $operation) {
            foreach ($operation[1] as $argument) {
                if ($argument instanceof self) {
                    $dependencies = array_merge($dependencies, $argument->getDependencies());
                }
            }
        }

        return $dependencies;
    }
1299716
protected function getModuleInfo(): array
    {
        if ($this->moduleInfo === null) {
            $this->moduleInfo = $this->package()->getExtra()['module'] ?? [];
        }

        return $this->moduleInfo;
    }
416422
public function resolve(): array
    {
        $path = $this->request->query->get('path');
        $method = $this->request->getMethod();

        $result = $this->match("/$path", $method);

        if (empty($result)) {
            $fallback = $this->settings->get('Melior.Routing.fallbackRoute');

            $result = [
                'target' => $this->settings->get("Melior.Routing.routes.$fallback.target"),
                'params' => [],
                'name' => $fallback
            ];
        }

        return $result;
    }
1058633
protected function findEnabledModules(): array
    {
        $aModules = Components::available(false);
        $aOut     = [];

        foreach ($aModules as $oModule) {
            $aOut[] = $this->determineModuleState($oModule->slug, $oModule->path . 'migrations/');
        }

        return array_filter($aOut);
    }