You are here

public static function AuditTrackEntities::prepareOutput in Acquia Content Hub 8.2

Output message.

Parameters

array $entity: Tracked entity.

string $msg: Message.

1 call to AuditTrackEntities::prepareOutput()
AuditTrackEntities::batchProcess in src/AuditTrackEntities.php
Checks published entities and compares them with Content Hub.

File

src/AuditTrackEntities.php, line 85

Class

AuditTrackEntities
Audit Pub/Sub track entities.

Namespace

Drupal\acquia_contenthub

Code

public static function prepareOutput(array $entity, string $msg) {
  $message = dt("@msg: Entity Type = @type, UUID = @uuid, ID = @id, Modified = @modified", [
    '@msg' => $msg,
    '@type' => $entity['entity_type'],
    '@uuid' => $entity['entity_uuid'],
    '@id' => $entity['entity_id'],
    '@modified' => $entity['modified'],
  ]);
  \Drupal::messenger()
    ->addMessage(dt($message));
}