getFilteredPackages() публичный Метод

Returns an array of PackageInterface objects of all packages that match the given package state, path, and type filters. All three filters must match, if given.
public getFilteredPackages ( string $packageState = 'available', string $packagePath = null, string $packageType = null ) : array
$packageState string defaults to available
$packagePath string
$packageType string
Результат array
 /**
  * If site packages already exist and are active, we will deactivate them in order to prevent
  * interactions with the newly created or imported package (like Content Dimensions being used).
  *
  * @param string $activePackageKey Package key of one package which should stay active
  * @return array deactivated site packages
  */
 protected function deactivateAllOtherSitePackages($activePackageKey)
 {
     $sitePackagesToDeactivate = $this->packageManager->getFilteredPackages('active', null, 'neos-site');
     $deactivatedSitePackages = array();
     foreach (array_keys($sitePackagesToDeactivate) as $packageKey) {
         if ($packageKey !== $activePackageKey) {
             $this->packageManager->deactivatePackage($packageKey);
             $deactivatedSitePackages[] = $packageKey;
         }
     }
     return $deactivatedSitePackages;
 }
 /**
  * If Site Packages already exist and are active, we will deactivate them in order to prevent
  * interactions with the newly created or imported package (like Content Dimensions being used).
  *
  * @param string $packageKey
  * @return array
  */
 protected function deactivateOtherSitePackages($packageKey)
 {
     $sitePackagesToDeactivate = $this->packageManager->getFilteredPackages('active', null, 'neos-site');
     $deactivatedSitePackages = array();
     foreach ($sitePackagesToDeactivate as $sitePackageToDeactivate) {
         if ($sitePackageToDeactivate->getPackageKey() !== $packageKey) {
             $this->packageManager->deactivatePackage($sitePackageToDeactivate->getPackageKey());
             $deactivatedSitePackages[] = $sitePackageToDeactivate->getPackageKey();
         }
     }
     if (count($deactivatedSitePackages) >= 1) {
         $this->flashMessageContainer->addMessage(new Message(sprintf('The existing Site Packages "%s" were deactivated, in order to prevent interactions with the newly created package "%s".', implode(', ', $deactivatedSitePackages), $packageKey)));
     }
 }