Source of file AttendeeTicketSelection.php
Size: 0,511 Bytes - Last Modified: 2021-12-23T10:11:34+00:00
/var/www/docs.ssmods.com/process/src/code/model/AttendeeTicketSelection.php
1234567891011121314151617181920212223 | <?php class AttendeeTicketSelection extends TicketSelection { private static $has_one = array( "Attendee" => "EventAttendee" ); /** * If ticket selection is deleted, and registration hasn't been submitted, * then also delete attendee. */ protected function onBeforeDelete() { $attendee = $this->Attendee(); $registration = $this->Registration(); if($attendee->exists() && !$registration->isSubmitted()){ $attendee->delete(); $attendee->destroy(); } parent::onBeforeDelete(); } } |