function hook_tmgmt_data_item_text_output_alter in Translation Management Tool 8
Allows to alter a text's segment masking the HTML tags from a tmgmt-tag.
Parameters
string $source_text: The source's text segment to alter.
string $translation_text: The translation's text segment to alter.
array $context: An associative array containing:
- data_item: The data item.
- job_item: The job item context.
1 function implements hook_tmgmt_data_item_text_output_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- tmgmt_test_tmgmt_data_item_text_output_alter in tmgmt_test/
tmgmt_test.module - Implements hook_tmgmt_data_item_text_output_alter().
1 invocation of hook_tmgmt_data_item_text_output_alter()
- JobItemForm::reviewFormElement in src/
Form/ JobItemForm.php - Build form elements for the review form using flattened data items.
File
- ./
tmgmt.api.php, line 313 - Hooks provided by the Translation Management module.
Code
function hook_tmgmt_data_item_text_output_alter(&$source_text, &$translation_text, array $context) {
$source_text = str_replace('First', 'Second', $source_text);
$translation_text = str_replace('First', 'Second', $translation_text);
}