You are here

function hook_diff_layout_builder_info_alter in Diff 8

Alter the information provided in \Drupal\diff\Annotation\DiffLayoutBuilder.

Parameters

array $diff_layouts: The array of diff layout builders plugins, keyed on the machine-readable plugin name.

1 invocation of hook_diff_layout_builder_info_alter()
DiffLayoutManager::__construct in src/DiffLayoutManager.php
Constructs a DiffLayoutManager object.

File

./diff.api.php, line 52
Hooks and documentation related to diff module.

Code

function hook_diff_layout_builder_info_alter(array &$diff_layouts) {

  // Set a new label for the text_field_diff_builder plugin
  // instead of the one provided in the annotation.
  $diff_layouts['my_layout']['label'] = t('New label');
}