You are here

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

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

Increments the stored number of attempts for a notification.

Parameters

object $notification: A notification object, in a format as returned by getNotifications().

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

File

src/AcsfThemeNotify.php, line 247

Class

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

Namespace

Drupal\acsf

Code

public function incrementNotificationAttempts($notification) {
  $this->database
    ->update('acsf_theme_notifications')
    ->fields([
    'attempts' => ++$notification->attempts,
  ])
    ->condition('id', $notification->id)
    ->execute();
}