CourseObjectWebformFulfillment.php in Course 8.3
File
modules/course_webform/src/Plugin/course/CourseObject/CourseObjectWebformFulfillment.php
View source
<?php
namespace Drupal\course_webform\Plugin\course\CourseObject;
use Drupal\course\Entity\CourseObjectFulfillment;
use Drupal\webform\Entity\WebformSubmission;
class CourseObjectWebformFulfillment extends CourseObjectFulfillment {
function optionsDefinition() {
return array(
'sids' => array(),
);
}
function delete() {
if ($ids = $this
->getOption('sids')) {
foreach (WebformSubmission::loadMultiple($ids) as $submission) {
$submission
->delete();
}
}
parent::delete();
}
}