You are here

public static function ConfigActionsTransform::delete in Config Actions 8

Walk a tree and remove a path

Parameters

array $tree : A base on which to add the path:

array $path : An array of keys to walk in the tree:

bool $prune_empty : If true then unset the data key, otherwise just: clear the data based on its existing value.

Return value

array: A copy of the $tree with the path removed

3 calls to ConfigActionsTransform::delete()
ConfigActionsDefault::transform in src/Plugin/ConfigActions/ConfigActionsDefault.php
Main transform to perform the change
ConfigActionsDelete::transform in src/Plugin/ConfigActions/ConfigActionsDelete.php
Main transform to perform the deletion
ConfigActionsTransformTest::testDelete in tests/src/Unit/ConfigActionsTransformTest.php
@covers ::delete

File

src/ConfigActionsTransform.php, line 227

Class

ConfigActionsTransform
Perform transformations on data needed for config_actions plugins

Namespace

Drupal\config_actions

Code

public static function delete(array $tree, array $path, $prune_empty = FALSE) {
  static::tree_delete_data($tree, $path, $prune_empty);
  return $tree;
}