You are here

function CourseObjectWebformFulfillment::delete in Course 8.3

Same name and namespace in other branches
  1. 8.2 modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebformFulfillment.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebformFulfillment::delete()
  2. 3.x modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebformFulfillment.php \Drupal\course_webform\Plugin\course\CourseObject\CourseObjectWebformFulfillment::delete()

Remove all webform submissions associated with this fulfillment.

Overrides CourseObjectFulfillment::delete

File

modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebformFulfillment.php, line 23

Class

CourseObjectWebformFulfillment
Course fulfillment class for webforms.

Namespace

Drupal\course_webform\Plugin\course\CourseObject

Code

function delete() {
  if ($ids = $this
    ->getOption('sids')) {
    foreach (WebformSubmission::loadMultiple($ids) as $submission) {
      $submission
        ->delete();
    }
  }
  parent::delete();
}