@@ 541-547 (lines=7) @@ | ||
538 | 'Question_Group', |
|
539 | [['Event_Question_Group.EQG_primary' => true]] |
|
540 | ); |
|
541 | if (! empty($orig_primary_qgs)) { |
|
542 | foreach ($orig_primary_qgs as $id => $obj) { |
|
543 | if ($obj instanceof EE_Question_Group) { |
|
544 | $new_event->_add_relation_to($obj, 'Question_Group', ['EQG_primary' => true]); |
|
545 | } |
|
546 | } |
|
547 | } |
|
548 | // next additional attendee question groups |
|
549 | $orig_additional_qgs = $orig_event->get_many_related( |
|
550 | 'Question_Group', |
|
@@ 553-559 (lines=7) @@ | ||
550 | 'Question_Group', |
|
551 | [['Event_Question_Group.EQG_additional' => true]] |
|
552 | ); |
|
553 | if (! empty($orig_additional_qgs)) { |
|
554 | foreach ($orig_additional_qgs as $id => $obj) { |
|
555 | if ($obj instanceof EE_Question_Group) { |
|
556 | $new_event->_add_relation_to($obj, 'Question_Group', ['EQG_additional' => true]); |
|
557 | } |
|
558 | } |
|
559 | } |
|
560 | ||
561 | $new_event->save(); |
|
562 |