public function onPostSerialize(ObjectEvent $event)
    {
        /** @var RedirectTypeBehavior $document */
        $document = $event->getObject();

        if (!$document instanceof WorkflowStageBehavior) {
            return;
        }

        $visitor = $event->getVisitor();
        $visitor->addData('publishedState', WorkflowStage::PUBLISHED === $document->getWorkflowStage());
    }