protected function processArguments(array $arguments, array $output, Message $message) {
    // Check if we have arguments saved along with the message.
    if (empty($arguments)) {
      return $output;
    }

    foreach ($arguments as $key => $value) {
      if (is_array($value) && !empty($value['callback']) && is_callable($value['callback'])) {

        // A replacement via callback function.
        $value += ['pass message' => FALSE];

        if ($value['pass message']) {
          // Pass the message object as-well.
          $value['arguments']['message'] = $message;
        }

        $arguments[$key] = call_user_func_array($value['callback'], $value['arguments']);
      }
    }

    foreach ($output as $key => $value) {
      $output[$key] = new FormattableMarkup($value, $arguments);
    }

    return $output;
  }
protected function processArguments(array $arguments, array $output, Message $message) {
    // Check if we have arguments saved along with the message.
    if (empty($arguments)) {
      return $output;
    }

    foreach ($arguments as $key => $value) {
      if (is_array($value) && !empty($value['callback']) && is_callable($value['callback'])) {

        // A replacement via callback function.
        $value += ['pass message' => FALSE];

        if ($value['pass message']) {
          // Pass the message object as-well.
          $value['arguments']['message'] = $message;
        }

        $arguments[$key] = call_user_func_array($value['callback'], $value['arguments']);
      }
    }

    foreach ($output as $key => $value) {
      $output[$key] = new FormattableMarkup($value, $arguments);
    }

    return $output;
  }
protected function processArguments ( array $ arguments , array $ output , Message $ message ) { // Check if we have arguments saved along with the message. if ( empty ( $ arguments ) ) { return $ output ; } foreach ( $ arguments as $ key => $ value ) { if ( is_array ( $ value ) && ! empty ( $ value [ 'callback' ] ) && is_callable ( $ value [ 'callback' ] ) ) { // A replacement via callback function. $ value += [ 'pass message' => FALSE ] ; if ( $ value [ 'pass message' ] ) { // Pass the message object as-well. $ value [ 'arguments' ] [ 'message' ] = $ message ; } $ arguments [ $ key ] = call_user_func_array ( $ value [ 'callback' ] , $ value [ 'arguments' ] ) ; } } foreach ( $ output as $ key => $ value ) { $ output [ $ key ] = new FormattableMarkup ( $ value , $ arguments ) ; } return $ output ; }
Process the message given the arguments saved with it.

@param array $arguments
Array with the arguments.
@param array $output
Array with the templated text saved in the message template.
@param \Drupal\message\Entity\Message $message
Message object.

@return array
The templated text, with the placeholders replaced with the actual value,
if there are indeed arguments.
Process the message given the arguments saved with it .