function tmgmt_message_create

Creates a translation job message.

Parameters

$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.

Return value

\Drupal\tmgmt\MessageInterface The created, not yet saved, message entity.

Related topics

2 calls to tmgmt_message_create()
Job::addMessage in src/Entity/Job.php
Add a log message for this job.
JobItem::addMessage in src/Entity/JobItem.php
Add a log message for this job item.

File

./tmgmt.module, line 418
Main module file for the Translation Management module.

Code

function tmgmt_message_create($message = '', $variables = array(), $values = array()) {
  return Message::create(array_merge($values, array(
    'message' => $message,
    'variables' => $variables,
    'uid' => \Drupal::currentUser()
      ->id(),
  )));
}