Creates a translation job message.
$message: (Optional) The message to be saved.
$variables: (Optional) An array of variables to replace in the message on display.
$values: (Optional) An array of additional entity values to be set.
\Drupal\tmgmt\MessageInterface The created, not yet saved, message entity.
function tmgmt_message_create($message = '', $variables = array(), $values = array()) {
return Message::create(array_merge($values, array(
'message' => $message,
'variables' => $variables,
'uid' => \Drupal::currentUser()
->id(),
)));
}