Neos\Flow\Package\PackageManagerInterface::isPackageAvailable PHP Метод

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

Returns TRUE if a package is available (the package's files exist in the packages directory) or FALSE if it's not. If a package is available it doesn't mean necessarily that it's active!
public isPackageAvailable ( string $packageKey ) : boolean
$packageKey string The key of the package to check
Результат boolean TRUE if the package is available, otherwise FALSE
    public function isPackageAvailable($packageKey);

Usage Example

 /**
  * Kickstart a new site package
  *
  * This command generates a new site package with basic TypoScript and Sites.xml
  *
  * @param string $packageKey The packageKey for your site
  * @param string $siteName The siteName of your site
  * @return string
  */
 public function siteCommand($packageKey, $siteName)
 {
     if (!$this->packageManager->isPackageKeyValid($packageKey)) {
         $this->outputLine('Package key "%s" is not valid. Only UpperCamelCase in the format "Vendor.PackageKey", please!', array($packageKey));
         $this->quit(1);
     }
     if ($this->packageManager->isPackageAvailable($packageKey)) {
         $this->outputLine('Package "%s" already exists.', array($packageKey));
         $this->quit(1);
     }
     $generatedFiles = $this->generatorService->generateSitePackage($packageKey, $siteName);
     $this->outputLine(implode(PHP_EOL, $generatedFiles));
 }
All Usage Examples Of Neos\Flow\Package\PackageManagerInterface::isPackageAvailable