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

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

        $visitor = $event->getVisitor();

        $redirectType = $document->getRedirectType();

        if (RedirectType::INTERNAL == $redirectType && null !== $document->getRedirectTarget()) {
            $visitor->addData('linked', 'internal');
            $visitor->addData('internal_link', $document->getRedirectTarget()->getUuid());
        } elseif (RedirectType::EXTERNAL == $redirectType) {
            $visitor->addData('linked', 'external');
            $visitor->addData('external', $document->getRedirectExternal());
        } else {
            $visitor->addData('linked', null);
        }
    }