public static function CronJob::postDelete in Ultimate Cron 8.2
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/ CronJob.php, line 178
Class
- CronJob
- Class for handling cron jobs.
Namespace
Drupal\ultimate_cron\EntityCode
public static function postDelete(EntityStorageInterface $storage, array $entities) {
foreach ($entities as $entity) {
if (empty($entity->dont_log)) {
/** @var \Drupal\ultimate_cron\Entity\CronJob $entity */
$log = $entity
->startLog(uniqid($entity
->id(), TRUE), 'modification', ULTIMATE_CRON_LOG_TYPE_ADMIN);
$log
->log('Job deleted by ' . $log
->formatUser(), array(), RfcLogLevel::INFO);
$log
->finish();
}
}
}