You are here

public function RuleSchedule::incrementAttempts in RNG - Events and Registrations 3.x

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

Increment number of attempts.

Attempt count is incremented before rule execution.

Return value

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

Overrides RuleScheduleInterface::incrementAttempts

File

src/Entity/RuleSchedule.php, line 75

Class

RuleSchedule
Defines the rule scheduler entity.

Namespace

Drupal\rng\Entity

Code

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