You are here

public function ScaffoldFilePath::getInterpolator in Drupal 8

Same name and namespace in other branches
  1. 9 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;
}