Implements hook_tmgmt_job_delete().
function tmgmt_local_tmgmt_job_delete(JobInterface $job) {
$tltids = \Drupal::entityQuery('tmgmt_local_task')
->accessCheck(TRUE)
->condition('tjid', $job
->id())
->execute();
if (!empty($tltids)) {
\Drupal::entityTypeManager()
->getStorage('tmgmt_local_task')
->delete(LocalTask::loadMultiple($tltids));
}
}