original_string: protected static function send_conversation_message_to_processors(array $eventprocmaps, message $eventdata,
                                                                        \stdClass $savemessage) {
          global $DB;
  
          // We cannot communicate with external systems in DB transactions,
          // buffer the messages if necessary.
          if ($DB->is_transaction_started()) {
              // Buffer this group conversation message and it's record.
              self::$convmessagebuffer[] = [$eventprocmaps, $eventdata, $savemessage];
              return;
          }
  
          // Send each localised version of the event data to each member's respective processors.
          foreach ($eventprocmaps as $eventprocmap) {
              $eventdata = $eventprocmap[0];
              $processorlist = $eventprocmap[1];
              self::call_processors($eventdata, $processorlist);
          }
  
          // Trigger event for sending a message or notification - we need to do this before marking as read!
          self::trigger_message_events($eventdata, $savemessage);
      }
code: protected static function send_conversation_message_to_processors(array $eventprocmaps, message $eventdata,
                                                                        \stdClass $savemessage) {
          global $DB;
  
          // We cannot communicate with external systems in DB transactions,
          // buffer the messages if necessary.
          if ($DB->is_transaction_started()) {
              // Buffer this group conversation message and it's record.
              self::$convmessagebuffer[] = [$eventprocmaps, $eventdata, $savemessage];
              return;
          }
  
          // Send each localised version of the event data to each member's respective processors.
          foreach ($eventprocmaps as $eventprocmap) {
              $eventdata = $eventprocmap[0];
              $processorlist = $eventprocmap[1];
              self::call_processors($eventdata, $processorlist);
          }
  
          // Trigger event for sending a message or notification - we need to do this before marking as read!
          self::trigger_message_events($eventdata, $savemessage);
      }
code_tokens: protected static function send_conversation_message_to_processors ( array $ eventprocmaps , message $ eventdata , \ stdClass $ savemessage ) { global $ DB ; // We cannot communicate with external systems in DB transactions, // buffer the messages if necessary. if ( $ DB -> is_transaction_started ( ) ) { // Buffer this group conversation message and it's record. self :: $ convmessagebuffer [ ] = [ $ eventprocmaps , $ eventdata , $ savemessage ] ; return ; } // Send each localised version of the event data to each member's respective processors. foreach ( $ eventprocmaps as $ eventprocmap ) { $ eventdata = $ eventprocmap [ 0 ] ; $ processorlist = $ eventprocmap [ 1 ] ; self :: call_processors ( $ eventdata , $ processorlist ) ; } // Trigger event for sending a message or notification - we need to do this before marking as read! self :: trigger_message_events ( $ eventdata , $ savemessage ) ; }
docstring: Takes a list of localised event data, and tries to send them to their respective member's message processors.
  
  Input format:
  [CONVID => [$localisedeventdata, $savemessage, $processorlist], ].
  
  @param array $eventprocmaps the array of localised event data and processors for each member of the conversation.
  @param message $eventdata the original conversation message eventdata
  @param \stdClass $savemessage the saved message record.
  @throws \coding_exception
docstring_tokens: Takes a list of localised event data and tries to send them to their respective member s message processors .