public function ManageOptions::getLocationReplacements in Drupal 9
Same name and namespace in other branches
- 8 composer/Plugin/Scaffold/ManageOptions.php \Drupal\Composer\Plugin\Scaffold\ManageOptions::getLocationReplacements()
Creates an interpolator for the 'locations' element.
The interpolator returned will replace a path string with the tokens defined in the 'locations' element.
Note that only the root package may define locations.
Return value
\Drupal\Composer\Plugin\Scaffold\Interpolator Interpolator that will do replacements in a string using tokens in 'locations' element.
File
- composer/
Plugin/ Scaffold/ ManageOptions.php, line 72
Class
- ManageOptions
- Per-project options from the 'extras' section of the composer.json file.
Namespace
Drupal\Composer\Plugin\ScaffoldCode
public function getLocationReplacements() {
return (new Interpolator())
->setData($this
->ensureLocations());
}