Bolt\Storage\EventProcessor\TimedRecord::dispatch PHP Method

dispatch() private method

Dispatch the update event.
private dispatch ( Content $content, string $type, string $legacyType )
$content Bolt\Storage\Entity\Content
$type string
$legacyType string
    private function dispatch(Content $content, $type, $legacyType)
    {
        $event = new StorageEvent($content, ['contenttype' => $content->getContenttype(), 'create' => false]);
        try {
            $this->dispatcher->dispatch("timed.{$type}", $event);
        } catch (\Exception $e) {
            $this->systemLogger->critical(sprintf('Dispatch handling failed for %s.', $content->getContenttype()), ['event' => 'exception', 'exception' => $e]);
        }
        try {
            /** @deprecated Deprecated since 3.1, to be removed in 4.0. */
            $this->dispatcher->dispatch("timed.{$legacyType}", $event);
        } catch (\Exception $e) {
            $this->systemLogger->critical(sprintf('Dispatch handling failed for %s.', $content->getContenttype()), ['event' => 'exception', 'exception' => $e]);
        }
    }