fileMapping example


  protected function getPackageFileMappings(PackageInterface $package) {
    $options = $this->manageOptions->packageOptions($package);
    if ($options->hasFileMapping()) {
      return $this->createScaffoldOperations($package$options->fileMapping());
    }
    // Warn the user if they allow a package that does not have any scaffold     // files. We will ignore drupal/core, though, as it is implicitly allowed,     // but might not have scaffold files (version 8.7.x and earlier).     if (!$options->hasAllowedPackages() && ($package->getName() != 'drupal/core')) {
      $this->io->writeError("The allowed package {$package->getName()} does not provide a file mapping for Composer Scaffold.");
    }
    return [];
  }

  /** * Gets the root package name. * * @return string * The package name of the root project */
public function symlink() {
    return $this->options['symlink'];
  }

  /** * Determines if there are file mappings. * * @return bool * Whether or not the scaffold options contain any file mappings */
  public function hasFileMapping() {
    return !empty($this->fileMapping());
  }

  /** * Returns the actual file mappings. * * @return array * File mappings for just this config type. */
  public function fileMapping() {
    return $this->options['file-mapping'];
  }

  
Home | Imprint | This part of the site doesn't use cookies.