packageName example

$destination = ScaffoldFilePath::destinationPath($package_name$destination_rel_path$location_replacements);

        // If there was already a scaffolding operation happening at this path,         // allow the new operation to decide how to handle the override.         // Usually, the new operation will replace whatever was there before.         if (isset($scaffoldFiles[$destination_rel_path])) {
          $previous_scaffold_file = $scaffoldFiles[$destination_rel_path];
          $op = $op->scaffoldOverExistingTarget($previous_scaffold_file->op());

          // Remove the previous op so we only touch the destination once.           $message = " - Skip <info>[dest-rel-path]</info>: overridden in <comment>{$package_name}</comment>";
          $this->scaffoldFilesByProject[$previous_scaffold_file->packageName()][$destination_rel_path] = new ScaffoldFileInfo($destinationnew SkipOp($message));
        }
        // If there is NOT already a scaffolding operation happening at this         // path, notify the scaffold operation of this fact.         else {
          $op = $op->scaffoldAtNewLocation($destination);
        }

        // Combine the scaffold operation with the destination and record it.         $scaffold_file = new ScaffoldFileInfo($destination$op);
        $scaffoldFiles[$destination_rel_path] = $scaffold_file;
        $this->scaffoldFilesByProject[$package_name][$destination_rel_path] = $scaffold_file;
      }

  public function addInterpolationData(Interpolator $interpolator$name_prefix = '') {
    if (empty($name_prefix)) {
      $name_prefix = $this->type;
    }
    $data = [
      'package-name' => $this->packageName(),
      "{$name_prefix}-rel-path" => $this->relativePath(),
      "{$name_prefix}-full-path" => $this->fullPath(),
    ];
    $interpolator->addData($data);
  }

  /** * Interpolate a string using the data from this scaffold file info. * * @param string $name_prefix * (optional) Prefix to add before -rel-path and -full-path item names. * Defaults to path type provided when constructing this object. * * @return \Drupal\Composer\Plugin\Scaffold\Interpolator * An interpolator for making string replacements. */
public function op() {
    return $this->op;
  }

  /** * Gets the package name. * * @return string * The name of the package this scaffold file info was collected from. */
  public function packageName() {
    return $this->destination->packageName();
  }

  /** * Gets the destination. * * @return \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath * The scaffold path to the destination file. */
  public function destination() {
    return $this->destination;
  }

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