added method to case to get case provisions
This commit is contained in:
@ -9,6 +9,7 @@ use Drupal\Core\Entity\RevisionableContentEntityBase;
|
||||
use Drupal\Core\Entity\RevisionableInterface;
|
||||
use Drupal\Core\Entity\EntityChangedTrait;
|
||||
use Drupal\Core\Entity\EntityTypeInterface;
|
||||
use Drupal\Core\Entity\EntityTypeManager;
|
||||
use Drupal\user\UserInterface;
|
||||
|
||||
/**
|
||||
@ -92,8 +93,10 @@ class OCCase extends RevisionableContentEntityBase implements OCCaseInterface
|
||||
];
|
||||
}
|
||||
|
||||
public function getCaseProvisions() {
|
||||
|
||||
public function getCaseProvisionIds(EntityTypeManager $etm): array {
|
||||
$query = \Drupal::entityTypeManager()->getStorage('oc_case_provision')->getQuery();
|
||||
$query->condition('oc_case.target_id', $this->id());
|
||||
return $query->execute();
|
||||
}
|
||||
|
||||
public function deleteCaseProvisions(): void {
|
||||
|
Reference in New Issue
Block a user