You are here

public function AcsfThemeNotify::getNotifications in Acquia Cloud Site Factory Connector 8.2

Same name and namespace in other branches
  1. 8 src/AcsfThemeNotify.php \Drupal\acsf\AcsfThemeNotify::getNotifications()

Gets a list of stored notifications to be resent.

Parameters

int $limit: The number of notifications to fetch.

Return value

object[] An array of theme notification objects.

1 call to AcsfThemeNotify::getNotifications()
AcsfThemeNotify::processNotifications in src/AcsfThemeNotify.php
Resends failed theme notifications.

File

src/AcsfThemeNotify.php, line 210

Class

AcsfThemeNotify
Manages theme notifications that need to be sent to the Factory.

Namespace

Drupal\acsf

Code

public function getNotifications($limit) {
  return $this->database
    ->select('acsf_theme_notifications', 'n')
    ->fields('n', [
    'id',
    'event',
    'theme',
    'timestamp',
    'attempts',
  ])
    ->orderBy('timestamp', 'ASC')
    ->range(0, $limit)
    ->execute()
    ->fetchAll();
}