Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ScaffoldFilePath.php

function ScaffoldFilePath::destinationPath

Converts the relative destination path into an absolute path.

Any placeholders in the destination path, e.g. '[web-root]', will be replaced using the provided location replacements interpolator.

Parameters

string $package_name: The name of the package defining the destination path.

string $destination: The relative path to the destination file being scaffolded.

\Drupal\Composer\Plugin\Scaffold\Interpolator $location_replacements: Interpolator that includes the [web-root] and any other available placeholder replacements.

Return value

self Object wrapping the relative and absolute path to the destination file.

1 call to ScaffoldFilePath::destinationPath()
ScaffoldFileCollection::__construct in composer/Plugin/Scaffold/Operations/ScaffoldFileCollection.php
ScaffoldFileCollection constructor.

File

composer/Plugin/Scaffold/ScaffoldFilePath.php, line 160

Class

ScaffoldFilePath
Manage the path to a file to scaffold.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

public static function destinationPath($package_name, $destination, Interpolator $location_replacements) {
    $dest_full_path = $location_replacements->interpolate($destination);
    return new self('dest', $package_name, $destination, $dest_full_path);
}
RSS feed
Powered by Drupal