Loading src/EventSubscriber/EntityRepeatEventSubscriber.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ class EntityRepeatEventSubscriber implements EventSubscriberInterface { // Get date occurrences. $dates = $helper->getOccurrences(); // Remove first date so we don't duplicate the original entity (same date). array_shift($dates); // Generate the entities. _entity_repeat_generate_entities($entity, $helper, $dates); } Loading @@ -51,8 +54,6 @@ class EntityRepeatEventSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents(): array { return [ DateRecurEvents::FIELD_VALUE_SAVE => ['onSave'], DateRecurEvents::FIELD_ENTITY_DELETE => ['onEntityDelete'], DateRecurEvents::FIELD_REVISION_DELETE => ['onEntityRevisionDelete'], ]; } Loading src/Plugin/Field/FieldWidget/EntityRepeatWidget.php +2 −2 Original line number Diff line number Diff line Loading @@ -107,8 +107,8 @@ class EntityRepeatWidget extends parentAlias { $form_state->setError($element['end'], t('End date must be provided.')); } // A limit to repeats must be provided if repeating more than once. if ($mode != 'once') { // A limit to repeats must be provided if repeating more than once and not a specific number of days (multiday). if ($mode != 'once' && $mode != 'multiday') { // Date must be provided if ends mode is date. if ($ends_mode == 'date' && !$ends_date instanceof DrupalDateTime) { $form_state->setError($element['ends_date'], t('Date to end repeats must be provided.')); Loading Loading
src/EventSubscriber/EntityRepeatEventSubscriber.php +3 −2 Original line number Diff line number Diff line Loading @@ -41,6 +41,9 @@ class EntityRepeatEventSubscriber implements EventSubscriberInterface { // Get date occurrences. $dates = $helper->getOccurrences(); // Remove first date so we don't duplicate the original entity (same date). array_shift($dates); // Generate the entities. _entity_repeat_generate_entities($entity, $helper, $dates); } Loading @@ -51,8 +54,6 @@ class EntityRepeatEventSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents(): array { return [ DateRecurEvents::FIELD_VALUE_SAVE => ['onSave'], DateRecurEvents::FIELD_ENTITY_DELETE => ['onEntityDelete'], DateRecurEvents::FIELD_REVISION_DELETE => ['onEntityRevisionDelete'], ]; } Loading
src/Plugin/Field/FieldWidget/EntityRepeatWidget.php +2 −2 Original line number Diff line number Diff line Loading @@ -107,8 +107,8 @@ class EntityRepeatWidget extends parentAlias { $form_state->setError($element['end'], t('End date must be provided.')); } // A limit to repeats must be provided if repeating more than once. if ($mode != 'once') { // A limit to repeats must be provided if repeating more than once and not a specific number of days (multiday). if ($mode != 'once' && $mode != 'multiday') { // Date must be provided if ends mode is date. if ($ends_mode == 'date' && !$ends_date instanceof DrupalDateTime) { $form_state->setError($element['ends_date'], t('Date to end repeats must be provided.')); Loading