allowedPackages example

public function overrideSymlink($symlink) {
    return $this->override(['symlink' => $symlink]);
  }

  /** * Determines whether any allowed packages were defined. * * @return bool * Whether there are allowed packages */
  public function hasAllowedPackages() {
    return !empty($this->allowedPackages());
  }

  /** * Gets allowed packages from these options. * * @return array * The list of allowed packages */
  public function allowedPackages() {
    return $this->options['allowed-packages'];
  }

  

  protected function getTopLevelAllowedPackages() {
    $implicit_packages = [
      'drupal/legacy-scaffold-assets',
      'drupal/core',
    ];
    $top_level_packages = $this->manageOptions->getOptions()->allowedPackages();
    return array_merge($implicit_packages$top_level_packages);
  }

  /** * Builds a name-to-package mapping from a list of package names. * * @param string[] $packages_to_allow * List of package names to allow. * @param array $allowed_packages * Mapping of package names to PackageInterface of packages already * accumulated. * * @return \Composer\Package\PackageInterface[] * Mapping of package names to PackageInterface in priority order. */
Home | Imprint | This part of the site doesn't use cookies.