public static function CourseObject::postDelete in Course 8.2
Same name and namespace in other branches
- 8.3 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::postDelete()
- 3.x src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::postDelete()
Acts on deleted entities before the delete hook is invoked.
Used after the entities are deleted but before invoking the delete hook.
Parameters
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.
\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.
Overrides EntityBase::postDelete
File
- src/
Entity/ CourseObject.php, line 970
Class
- CourseObject
- Parent abstract base class of all course objects.
Namespace
Drupal\course\EntityCode
public static function postDelete(Drupal\Core\Entity\EntityStorageInterface $storage, array $entities) {
$fs = \Drupal::entityTypeManager()
->getStorage('course_object_fulfillment');
$coids = array_keys($entities);
$fulfillments = $fs
->loadByProperties([
'coid' => $coids,
]);
$fs
->delete($fulfillments);
parent::postDelete($storage, $entities);
}