<?php
 class vB_Systemevent_Item_Content_RelatedText extends vB_Systemevent_Item { protected array $cronitem = []; protected array $serializefields = ['cronitem']; public static function create(array $cronitem = []) : self { $item = new self(); $item->cronitem = $cronitem; return $item; } public function run() : void { require_once(DIR . '/includes/functions_cron.php'); try { if ($this->cronitem) { log_cron_phrase('task_relatedtopicsfull_started', $this->cronitem); } $data = vB_RelatedText_Data::createDefault(); $data->processAll(); if ($this->cronitem) { log_cron_action('', $this->cronitem, 1, true); } } catch (Throwable $e) { if ($this->cronitem) { log_cron_exception($e, $this->cronitem); } else { throw $e; } } } public function interrupt() : bool { if ($this->cronitem) { log_cron_action('Process timed out.', $this->cronitem, 0, true); } return false; } } 