Started adding function to case, to get case providers

This commit is contained in:
naomi 2022-06-07 13:54:19 +01:00
parent ffb56ab09f
commit b70697995a

View File

@ -92,6 +92,10 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface
];
}
public function getCaseProvisions() {
}
public function deleteCaseProvisions(): void {
$this->deleteChildren('oc_case_provision');
}
@ -99,8 +103,7 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface
$this->deleteChildren('oc_activity');
}
public function deleteChildren($child_entity_type):void {
private function deleteChildren($child_entity_type):void {
$query = \Drupal::entityQuery($child_entity_type)
->condition('oc_case.target_id', $this->id());
$ids = $query->execute();