function ManageOptions::getLocationReplacements
Same name in other branches
- 9 composer/Plugin/Scaffold/ManageOptions.php \Drupal\Composer\Plugin\Scaffold\ManageOptions::getLocationReplacements()
- 8.9.x composer/Plugin/Scaffold/ManageOptions.php \Drupal\Composer\Plugin\Scaffold\ManageOptions::getLocationReplacements()
- 11.x 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());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.