Neos\Flow\Package\PackageManager::filterPackagesByType PHP Method

filterPackagesByType() protected method

Returns an array of PackageInterface objects in the given array of packages that are of the specified package type.
protected filterPackagesByType ( array &$packages, string $packageType ) : array
$packages array Array of PackageInterface objects to be filtered
$packageType string Filter out anything that's not of this packageType
return array
    protected function filterPackagesByType(&$packages, $packageType)
    {
        $filteredPackages = [];
        /** @var $package Package */
        foreach ($packages as $package) {
            if ($package->getComposerManifest('type') === $packageType) {
                $filteredPackages[$package->getPackageKey()] = $package;
            }
        }
        return $filteredPackages;
    }