function Fixtures::destinationPath
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::destinationPath()
- 10 core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::destinationPath()
- 11.x core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Fixtures.php \Drupal\Tests\Composer\Plugin\Scaffold\Fixtures::destinationPath()
Gets a destination path in a tmp dir.
Use in place of ScaffoldFilePath::destinationPath().
Parameters
string $destination: Destination path; should be in the form '[web-root]/robots.txt', where '[web-root]' is always literally '[web-root]', with any arbitrarily desired filename following.
\Drupal\Composer\Plugin\Scaffold\Interpolator $interpolator: Location replacements. Obtain via Fixtures::getLocationReplacements() when creating multiple scaffold destinations.
string $package_name: (optional) The name of the fixture package that this path came from. Taken from interpolator if not provided.
Return value
\Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath A destination scaffold file backed by temporary storage.
See also
\Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath::destinationPath()
File
-
core/
tests/ Drupal/ Tests/ Composer/ Plugin/ Scaffold/ Fixtures.php, line 238
Class
- Fixtures
- Convenience class for creating fixtures.
Namespace
Drupal\Tests\Composer\Plugin\ScaffoldCode
public function destinationPath($destination, Interpolator $interpolator = NULL, $package_name = NULL) {
$interpolator = $interpolator ?: $this->getLocationReplacements();
$package_name = $package_name ?: $interpolator->interpolate('[package-name]');
return ScaffoldFilePath::destinationPath($package_name, $destination, $interpolator);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.