/** * {@inheritdoc} */ public function guessValues(UrlInformation $urlInformation, $object, $sitemap) { if (null !== $urlInformation->getDepth()) { return; } $manager = $this->managerRegistry->getManagerForClass(ClassUtils::getRealClass(get_class($object))); if (!$manager instanceof DocumentManager) { return; } $node = $manager->getNodeForDocument($object); if (null === $node) { return; } $urlInformation->setDepth($node->getDepth() - $this->offset); }