Gathers Extension Information

@return array
11550
private function gatherInformation()
    {
        /** @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager */
        $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(ObjectManager::class);
        /** @var ListUtility $service */
        $service = $objectManager->get('TYPO3\\CMS\\Extensionmanager\\Utility\\ListUtility');

        $extensionInformation = $service->getAvailableExtensions();
        foreach ($extensionInformation as $extensionKey => $info) {
            if (true === array_key_exists($extensionKey, $GLOBALS['TYPO3_LOADED_EXT'])) {
                $extensionInformation[$extensionKey]['installed'] = 1;
            } else {
                $extensionInformation[$extensionKey]['installed'] = 0;
            }
        }
        return $extensionInformation;
    }
763241
public static function discoverAll()
    {
        $components = [];

        // Run through all extensions
        foreach (ExtensionManagementUtility::getLoadedExtensionListArray() as $extensionKey) {
            $components = array_merge($components, self::discoverExtensionComponents($extensionKey));
        }

        return $components;
    }
1263028
public function getActualExtension()
    {
        $route = Route::getCurrentRoute();

        if ($route instanceof \Illuminate\Routing\Route) {
            $action = $route->getActionName();

            if ($action === 'Closure') {
                return false;
            }

            preg_match("/.+?(?=\\\)(.*)\Http/", $action, $matches);
            return empty($matches) ? false : strtolower(trim($matches[1], '\\'));
        }

        return false;
    }
796031
protected function getExtensions() {
        if (!$this->_extensions) {
            $this->_extensions = new InstalledAddOnExtensionList($this->version, $this->solution['sid']);
        }

        return $this->_extensions;
    }
1327861
public function getContentExtensions()
    {
        if (!empty($this->validExtensions)) {
            return $this->validExtensions;
        }

        return $this->validExtensions = $this->getContentTypeHandler()->getContentExtensions();
    }
367736
protected function resolveExtends()
    {
        $extend = [];
        foreach ($this->_targets as $name => $target) {
            if (empty($target['extend'])) {
                continue;
            }
            $parent = $target['extend'];
            if (empty($this->_targets[$parent])) {
                throw new RuntimeException("Invalid extend in '$name'. There is no '$parent' target defined.");
            }
            $extend[] = $name;
        }

        $expander = function ($target) use (&$expander, $extend) {
            $config = $this->_targets[$target];
            $parentConfig = false;

            // Recurse through parents to collect all config.
            if (in_array($target, $extend)) {
                $parentConfig = $expander($config['extend']);
            }
            if (!$parentConfig) {
                return $config;
            }
            $config['files'] = array_merge($parentConfig['files'], $config['files']);
            $config['filters'] = array_merge($parentConfig['filters'], $config['filters']);
            $config['theme'] = $parentConfig['theme'] || $config['theme'];
            return $config;
        };

        foreach ($extend as $target) {
            $this->_targets[$target] = $expander($target);
        }
    }
1322511
public function getExtension()
    {
        $pathInfo = pathinfo($this->getName());
        $extension = ExtensionGuesser::getInstance()->guess($this->getMimeType());
        if ($extension) {
            return $extension;
        } elseif (isset($pathInfo['extension'])) {
            return $pathInfo['extension'];
        }

        return null;
    }
717839
public function findExtensions(): Extensions
    {
        $extensions = new Extensions();


        foreach ($this->configRepository->getPaths() as $path) {
            $composerPattern = $this->configRepository->getRootPath() . '/' . $path . '/composer.json';

            $composerFiles = $this->filesystem->glob($composerPattern);



            if ($composerFiles === false) {
                throw new ExtensionException('Error occurs when looking for extensions in the [' . $composerPattern . '] path.');
            }

            foreach ($composerFiles as $composerFile) {
                $package = $this->extensionFactory->getComposerPackage($composerFile);

                if (!in_array($package->getType(), self::$validTypes, true)) {
                    continue;
                }

                $extension = $this->extensionFactory->create($composerFile);

                if (!$this->extensionValidator->isValid($extension)) {
                    throw new ExtensionException('The extension [' . $extension->getPackage()->getName() . '] is not valid.');
                }

                $extensions->push($extension);
            }
        }

        return $extensions;
    }
712154
private function getOntologyFiles()
    {
        $returnValue = array();

        
        $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($this->options['extension']);
        $returnValue = $ext->getManifest()->getInstallModelFiles();
        

        return (array) $returnValue;
    }
1349470
private function getExtensionsInfo(array $projects) {
    $value = [];
    uasort($projects, 'system_sort_modules_by_info_name');
    /** @var \Drupal\Core\Extension\Extension $project */
    foreach ($projects as $project) {
      $name = $project->getName();
      $info = $project->info;
      unset($info['dependencies']);
      $value[$name] = [
        'type' => $project->getType(),
        'name' => $name,
        'status' => $project->status,
        'origin' => $project->origin,
        'info' => $info,
      ];
    }
    return $value;
  }
947268
protected function collectExtensions($name)
    {

        $extensions = [];

        foreach ($this->extensions() as $pattern) {
            if ($this->patternMatches($pattern, $name)) {
                $extensions[] = $this->getExtension($pattern);
            }
        }

        return $extensions;

    }
503229
public function getExtensions()
		{

			// Loop through extension map
			$exts = array();
			foreach (self::$extensionMap as $ext => $type) {
				if ($type == $this->type) {
					$exts[] = $ext;
				}
			}
			return $exts;

		}
85132
public function extensions()
    {
        foreach ($this->extensionsToCheck as $extension) {
            $extensions[$extension] = extension_loaded($extension);
        }

        return $extensions;
    }
1137131
public function getBusinessEntityExtends()
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $aExtends = [];

        foreach ($this->_aBusinessEntityExtends as $sExtend) {
            $aExtends[$sExtend] = $myConfig->getConfigParam($sExtend);
        }

        return $aExtends;
    }
288145
protected function gatherInfo() {
        $info = new stdClass();
        $info->contents = $this->contents;
        $info->path = $this->path;
        $info->lastModified = $this->lastModified;

        return $info;
    }
444071
public function getExtensions()
    {
        if (null == $this->extensions_unserialized && null !== $this->extensions) {
            $this->extensions_unserialized = unserialize($this->extensions);
        }

        return $this->extensions_unserialized;
    }
1318290
public function index()
    {
        Session::forget('install-module');

        $result = [];
        foreach ($this->extensions as $ext) {
            if (extension_loaded($ext)) {
                $result [$ext] = 'true';
            } else {
                $result [$ext] = false;
            }
        }

        return view('avored-install::install.extension')->with('result', $result);
    }