function ScaffoldFilePath::getInterpolator

Same name in other branches
  1. 8.9.x composer/Plugin/Scaffold/ScaffoldFilePath.php \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath::getInterpolator()
  2. 10 composer/Plugin/Scaffold/ScaffoldFilePath.php \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath::getInterpolator()
  3. 11.x composer/Plugin/Scaffold/ScaffoldFilePath.php \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath::getInterpolator()

Interpolate a string using the data from this scaffold file info.

Parameters

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 value

\Drupal\Composer\Plugin\Scaffold\Interpolator An interpolator for making string replacements.

File

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

Class

ScaffoldFilePath
Manage the path to a file to scaffold.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

public function getInterpolator($name_prefix = '') {
    $interpolator = new Interpolator();
    $this->addInterpolationData($interpolator, $name_prefix);
    return $interpolator;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.