You are here

public function RlDateRecurRule::__construct in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 src/Rl/RlDateRecurRule.php \Drupal\date_recur\Rl\RlDateRecurRule::__construct()
  2. 3.0.x src/Rl/RlDateRecurRule.php \Drupal\date_recur\Rl\RlDateRecurRule::__construct()
  3. 3.1.x src/Rl/RlDateRecurRule.php \Drupal\date_recur\Rl\RlDateRecurRule::__construct()

Creates a new RlDateRecurRule.

@internal constructor subject to change at any time. Creating RlDateRecurRule objects is reserved by date_recur module.

File

src/Rl/RlDateRecurRule.php, line 29

Class

RlDateRecurRule
RRule object.

Namespace

Drupal\date_recur\Rl

Code

public function __construct(array $parts) {
  if (!isset($parts['FREQ'])) {
    throw new \Exception('Frequency must be defined.');
  }
  $this->parts = $parts;
}