You are here

public function TrackTotals::onPromoteEntityStatusTrackTotals in Acquia Content Hub 8.2

Event Handler onPromoteEntityStatusTrackTotals.

Parameters

\Drupal\acquia_contenthub\Event\BuildClientCdfEvent $event: The build client cdf event data.

File

modules/acquia_contenthub_subscriber/src/EventSubscriber/PromoteEntityStatusTrack/TrackTotals.php, line 52

Class

TrackTotals
Class TrackTotals to track subscribed entities in the client CDF object.

Namespace

Drupal\acquia_contenthub_subscriber\EventSubscriber\PromoteEntityStatusTrack

Code

public function onPromoteEntityStatusTrackTotals(BuildClientCdfEvent $event) : void {
  $cdf = $event
    ->getCdf();
  $metadata = $cdf
    ->getMetadata();
  $metadata['metrics']['subscriber'] = $this->tracker
    ->getStatusMetrics($this->tracker::IMPORT_TRACKING_TABLE, 'last_imported');
  $cdf
    ->setMetadata($metadata);
}