You are here

public function ConfigActionsChange::transform in Config Actions 8

Main transform to perform the change

Overrides ConfigActionsPluginBase::transform

File

src/Plugin/ConfigActions/ConfigActionsChange.php, line 36

Class

ConfigActionsChange
Plugin for changing data.

Namespace

Drupal\config_actions\Plugin\ConfigActions

Code

public function transform(array $source) {
  if (isset($this->value)) {
    $this
      ->validatePath($source);
    $source = ConfigActionsTransform::change($source, $this->path, $this->value);
  }
  return $source;
}