You are here

protected function PixelBuilderService::getStoredEvents in Simple Facebook Pixel 8

Gets events stored in Private Temp Store.

1 call to PixelBuilderService::getStoredEvents()
PixelBuilderService::getEvents in src/PixelBuilderService.php
Gets all events.

File

src/PixelBuilderService.php, line 133

Class

PixelBuilderService
Class PixelBuilderService.

Namespace

Drupal\simple_facebook_pixel

Code

protected function getStoredEvents() {
  $events = $this->privateTempStore
    ->get('events');
  try {
    $this->privateTempStore
      ->delete('events');
  } catch (\Exception $ex) {
  }
  return $events ?: [];
}