Get where dependencies are installed.

@return string
420209
public function getDependenciesFolder()
    {
        // Look for a configuration file
        $paths = array_filter([
            $this->paths->getBasePath().'.bowerrc',
            $this->paths->getUserHomeFolder().'/.bowerrc',
        ], [$this->files, 'has']);

        $file = head($paths);
        if ($file) {
            $file = $this->files->read($file);
            $file = json_decode($file, true);
        }

        return array_get($file, 'directory', 'bower_components');
    }
756136
private function installed()
    {
        if ($this->installed === null) {
            $this->installed = $this->app->isInstalled();
        }

        return $this->installed;
    }
948908
protected function resolveDependencies(): array
    {
        $dependencies = [];
        $modules = $this->manager->modules();

        foreach ($this->package()->getRequires() as $dependency) {
            $target = $dependency->getTarget();
            if (isset($modules[$target])) {
                $dependencies[$target] = $modules[$target];
            }
        }

        return $dependencies;
    }
952360
protected function enforce_dependencies() {
        // Get the plan.
        $plan = $this->controller->get_plan();
        // Get the tasks as a var so we can iterate by reference.
        $tasks = $plan->get_tasks();
        $changes = 0;
        foreach ($tasks as &$task) {
            // Store as a var so we can iterate by reference.
            $settings = $task->get_settings();
            foreach ($settings as &$setting) {
                // Get all dependencies for iteration by reference.
                $dependencies = $setting->get_dependencies();
                foreach ($dependencies as &$dependency) {
                    // Enforce each dependency.
                    if ($dependency->enforce()) {
                        $changes++;
                    }
                }
            }
        }
        // Store the number of settings that changed through enforcement.
        $this->dependencychanges = $changes;
        return ($changes > 0);
    }
367026
public function getPackages()
    {
        if (null === $this->packages) {
            $this->packages = $this->findPackages();
        }

        return $this->packages;
    }
532172
public function getInstalledModules()
    {
        $modules = $this->modules;

        if ($this->rootModule) {
            unset($modules[$this->rootModule->getName()]);
        }

        return $modules;
    }
1316304
protected function getBuildRoot() {

    $extra = $this->package->getExtra();
    $paths = isset($extra['installer-paths']) ? $extra['installer-paths'] : [];
    foreach ($paths as $path => $types) {
      if (in_array("type:drupal-core", $types)) {
        return str_replace('/core', '', $path);
      }
    }

    throw new InstallerPathsNotFoundException();
  }
561588
protected function getDependencyMapping()
    {
        $constructor = (new ReflectionClass($this->className))
            ->getConstructor();

        $dependencies = [];

        if (!is_null($constructor)) {
            foreach ($constructor->getParameters() as $param) {
                $dependencies[$param->getClass()->getName()] = $param->getName();
            }
        }

        return $dependencies;
    }
1303840
public function getRequiredPhpVersion()
    {
        @$packageInfo = $this->registry->packageInfo( 'ezcomponents', null, 'components.ez.no' );
        if ( array_key_exists( 'required', $packageInfo['dependencies'] ) )
        {
            return $packageInfo['dependencies']['required']['php']['min'];
        }
        return $packageInfo['dependencies']['php']['min'];
    }
800966
public function formatDependencies()
    {
        $variablesVariable = $this->getOption('pug_variables_variable_name');

        $dependencies = $variablesVariable ? implode("\n", [
            '<?php',
            '$'.$variablesVariable.' = [];',
            'foreach (array_keys(get_defined_vars()) as $__pug_key) {',
            '    $'.$variablesVariable.'[$__pug_key] = &$$__pug_key;',
            '}',
            '?>',
        ]) : '';

        if ($this->dependencies->countRequiredDependencies() > 0) {
            $dependenciesExport = $this->dependencies->export(
                $this->getOption('dependencies_storage')
            );

            $dependencies .= $this->format(new CodeElement(trim($dependenciesExport)));
        }

        foreach ($this->mixins->getRequirementsStates() as $key => $value) {
            if ($value || $this->mixinsAllRequired || in_array($key, $this->mixinsPreCalled)) {
                $dependencies .= $this->mixins->get($key);
            }
        }

        return $dependencies;
    }
38220
public function requiredBy()
    {
        if ($cache = $this->config('required_by')) {
            return collection($cache);
        }

        Plugin::dropCache();
        $out = [];
        $plugins = Plugin::get()->filter(function ($v, $k) {
            return $v->name() !== $this->name();
        });

        foreach ($plugins as $plugin) {
            if ($dependencies = $plugin->dependencies($plugin->name)) {
                $packages = array_map(function ($item) {
                    list(, $package) = packageSplit($item, true);

                    return strtolower($package);
                }, array_keys($dependencies));

                if (in_array(strtolower($this->name()), $packages)) {
                    $out[] = $plugin;
                }
            }
        }

        $this->config('required_by', $out);

        return collection($out);
    }
160376
protected function getDefaultInstall()
    {
        $data = array();
        $data['database']['port'] = 3306;
        $data['database']['user'] = 'root';
        $data['database']['type'] = 'mysql';
        $data['database']['host'] = 'localhost';
        $data['database']['password'] = '';
        $data['store']['basepath'] = '';
        $data['store']['title'] = 'GPL Cart';
        $data['store']['host'] = 'localhost';
        $data['store']['timezone'] = date_default_timezone_get();

        return $data;
    }
377119
public function getInstalledHandles()
    {
        $query = 'select p.pkgHandle from \\Concrete\\Core\\Entity\\Package p';
        $r = $this->entityManager->createQuery($query);
        $result = $r->getArrayResult();
        $handles = [];
        foreach ($result as $r) {
            $handles[] = $r['pkgHandle'];
        }

        return $handles;
    }
1135931
private static function getPresetsInfo() {
    $installation_types = self::getInstallationTypes(TRUE);
    $presets_info = [];
    $packages_info = self::getPackages();

    foreach ($installation_types as $preset => $preset_info) {
      $presets_info[$preset] = $preset_info;
      $presets_info[$preset]['packages_expanded'] = [];
      foreach ($preset_info['packages'] as $package) {
        if (empty($packages_info[$package])) {
          continue;
        }
        $presets_info[$preset]['packages_expanded'][$package] = $packages_info[$package];
        if (!isset($packages_info[$package]['usage'])) {
          $packages_info[$package]['usage'] = 0;
        }
        $packages_info[$package]['usage']++;
      }
    }

    return $presets_info;
  }
1026089
public function getUpdates()
    {
        if (!$this->loadRepositories()) {
            return Repository::STATUS_NO_REPOSITORIES;
        }

        $modules = $this->getModulesFromRepository();

        // Is a higher version of an already installed package available?
        foreach ($modules as $key => $module) {
            $version = $this->packageService->getVersion($module->name);

            if (!$version) {
                // Not installed at all.
                unset($modules[$key]);
            } elseif (version_compare($version, $module->version, '<')) {
                // Older version installed.
                $modules[$key]->versionInstalled = $version;
            } else {
                unset($modules[$key]);
            }
        }

        return $modules;
    }
1109301
public function getDependencies(): array
    {
        $dependencies = [];
        foreach ($this->config['dependencies'] as $dependency) {
            $dependencies[] = $this->wire($dependency);
        }

        return $dependencies;
    }
360233
public function getInstalledThemes(): array
    {
        $installed = $this->cache->get($this->cacheKey);

        if ($installed !== null) {
            return $installed;
        }

        return $this->findAndInstallThemes();
    }