InstalledVersions::getInstalledPackagesByType( string $type )
Returns a list of all package names with a specific type e.g. ‘library’
Contents
Parameters Parameters
- $type
-
(string) (Required)
Return Return
(string[])
Source Source
File: libraries/lifterlms-cli/vendor/composer/InstalledVersions.php
public static function getInstalledPackagesByType($type) { $packagesByType = array(); foreach (self::getInstalled() as $installed) { foreach ($installed['versions'] as $name => $package) { if (isset($package['type']) && $package['type'] === $type) { $packagesByType[] = $name; } } } return $packagesByType; }
Expand full source code Collapse full source code View on GitHub