public function TransitionSet::__construct in Lightning Scheduler 8
TransitionSet constructor.
Parameters
\Drupal\datetime\Plugin\Field\FieldType\DateTimeFieldItemList $date_list: A set of scheduled transition dates for an entity.
\Drupal\Core\Field\FieldItemListInterface $state_list: A set of scheduled workflow states for an entity.
Throws
\InvalidArgumentException if the date list and state list are not of equal length.
File
- src/
TransitionSet.php, line 43
Class
- TransitionSet
- @internal This is an internal part of Lightning Scheduler and may be changed or removed at any time without warning. It should not be used by external code in any way.
Namespace
Drupal\lightning_schedulerCode
public function __construct(DateTimeFieldItemList $date_list, FieldItemListInterface $state_list) {
if (count($date_list) !== count($state_list)) {
throw new \InvalidArgumentException('Transition sets must have equal-length sets of dates and workflow states.');
}
$this->dateList = $date_list;
$this->stateList = $state_list;
}