You are here

function hook_tmgmt_data_item_text_input_alter in Translation Management Tool 8

Allows to alter a text's segment unmasking the HTML tags into a tmgmt-tag.

Parameters

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_input_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_input_alter in tmgmt_test/tmgmt_test.module
Implements hook_tmgmt_data_item_text_input_alter().
1 invocation of hook_tmgmt_data_item_text_input_alter()
JobItemForm::save in src/Form/JobItemForm.php
Overrides Drupal\Core\Entity\EntityForm::save().

File

./tmgmt.api.php, line 328
Hooks provided by the Translation Management module.

Code

function hook_tmgmt_data_item_text_input_alter(&$translation_text, array $context) {
  $translation_text = str_replace('Second', 'First', $translation_text);
}