You are here

public function RuleSchedule::getAttempts in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/Entity/RuleSchedule.php \Drupal\rng\Entity\RuleSchedule::getAttempts()
  2. 3.x src/Entity/RuleSchedule.php \Drupal\rng\Entity\RuleSchedule::getAttempts()

Returns number of times the rule has been triggered while in the queue.

The rule will attempt to execute until success, or reached maximum attempt cap.

Return value

int Number of attempts.

Overrides RuleScheduleInterface::getAttempts

1 call to RuleSchedule::getAttempts()
RuleSchedule::incrementAttempts in src/Entity/RuleSchedule.php
Increment number of attempts.

File

src/Entity/RuleSchedule.php, line 68

Class

RuleSchedule
Defines the rule scheduler entity.

Namespace

Drupal\rng\Entity

Code

public function getAttempts() {
  return $this
    ->get('attempts')->value;
}