Neos\Flow\Package\PackageManager::filterPackagesByPath PHP Метод

filterPackagesByPath() защищенный Метод

Returns an array of PackageInterface objects in the given array of packages that are in the specified Package Path
protected filterPackagesByPath ( array &$packages, string $filterPath ) : array
$packages array Array of PackageInterface to be filtered
$filterPath string Filter out anything that's not in this path
Результат array
    protected function filterPackagesByPath(&$packages, $filterPath)
    {
        $filteredPackages = [];
        /** @var $package Package */
        foreach ($packages as $package) {
            $packagePath = substr($package->getPackagePath(), strlen($this->packagesBasePath));
            $packageGroup = substr($packagePath, 0, strpos($packagePath, '/'));
            if ($packageGroup === $filterPath) {
                $filteredPackages[$package->getPackageKey()] = $package;
            }
        }
        return $filteredPackages;
    }