You are here

public function RuleSchedule::incrementAttempts in RNG - Events and Registrations 8

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

Increment number of attempts.

Attempt count is incremented before rule execution.

Return value

\Drupal\rng\RuleScheduleInterface Returns rule schedule for chaining.

Overrides RuleScheduleInterface::incrementAttempts

File

src/Entity/RuleSchedule.php, line 76

Class

RuleSchedule
Defines the rule scheduler entity.

Namespace

Drupal\rng\Entity

Code

public function incrementAttempts() {
  $this
    ->set('attempts', $this
    ->getAttempts() + 1);
  return $this;
}