function Interpolator::addData

Same name in other branches
  1. 9 composer/Plugin/Scaffold/Interpolator.php \Drupal\Composer\Plugin\Scaffold\Interpolator::addData()
  2. 8.9.x composer/Plugin/Scaffold/Interpolator.php \Drupal\Composer\Plugin\Scaffold\Interpolator::addData()
  3. 11.x composer/Plugin/Scaffold/Interpolator.php \Drupal\Composer\Plugin\Scaffold\Interpolator::addData()

Adds to the data set to use when interpolating.

Parameters

array $data: The key:value pairs to use when interpolating.

Return value

$this

File

composer/Plugin/Scaffold/Interpolator.php, line 67

Class

Interpolator
Injects config values from an associative array into a string.

Namespace

Drupal\Composer\Plugin\Scaffold

Code

public function addData(array $data) {
    $this->data = array_merge($this->data, $data);
    return $this;
}

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