Return the localization state of the node.

@param object $document

@return string
512265
public function getLocalizationState($document)
    {
        if ($document instanceof ShadowLocaleBehavior) {
            if (true === $document->isShadowLocaleEnabled()) {
                return LocalizationState::SHADOW;
            }
        }

        $originalLocale = $document->getOriginalLocale();
        $currentLocale = $document->getLocale();

        if ($originalLocale === $currentLocale) {
            return LocalizationState::LOCALIZED;
        }

        return LocalizationState::GHOST;
    }
610651
protected function getLocation(Document $document, $sm) 
	{
		$main = $sm->get('neobazaar.service.main');
		$location = $document->getGeoname();
		if(null !== $location) {
			if('ADM3' == $location->getFeatureCode()) {
				$location = $main->getGeonamesEntityRepository()->getParent($location);
			}
		}
		
		return null !== $location ? $location->getUrl() : '';
	}
1177338
public function parseDocument(\DOMDocument $document)
    {
        foreach ($this->registry[DocumentExtension::class] as $extension) {
            $doc = $extension->parseDocument($this, $document);
            if ($doc) {
                return $doc;
            }
        }

        return null;
    }
359566
public function getTfIdf(DocumentAbstract $document, $token, $mode = 1)
    {
        return $this->getTermFrequency($document, $token, $mode) * $this->getIdf($token);
    }
1311293
public function getUrlsafeIdentifier($document)
    {
        $id = $this->getNormalizedIdentifier($document);

        if (null !== $id) {
            return substr($id, 1);
        }
    }
132039
public function getSubscriptionName(DocumentNode $document): string
    {
        return $document->definitions[0]->selectionSet->selections[0]->name->value;
    }
133417
public function getDocument($document, $rootNode)
	{
		if ($rootNode == null)
		{
			$rootNode = "page";
		}
		return $this->_persistUtil->getDocument($document, $rootNode);
	}
1145383
private function hydrateEntity($document)
    {
        $class = $this->entityClass;
        $reflectionClass = new \ReflectionClass(AbstractDocument::class);
        $entity = new $class();

        if (!($entity instanceof AbstractDocument)) {
            throw new \Exception(sprintf('"%s" is not a subclass of "%s"', $this->entityClass, AbstractDocument::class));
        }

        $documentProperty = $reflectionClass->getProperty('document');
        $documentProperty->setAccessible(true);
        $documentProperty->setValue($entity, $document);

        return $entity;
    }
250323
public function getName($document)
	{
		$i=strpos($document,'#');

		if ($i!== false)
		{
			return substr($document, 0, $i);

		}
		else
		{
			return $document;
		}
	}
1189264
private function getState($object)
    {
        if (!$this->entityStates->contains($object)) {
            $this->createState($object, false);
        }

        return $this->entityStates[ $object ];
    }
676966
protected function findOrCreateViewDocument(ArticleDocument $document, $locale, $localizationState)
    {
        $articleId = $this->getViewDocumentId($document->getUuid(), $locale);
        /** @var ArticleViewDocumentInterface $article */
        $article = $this->manager->find($this->documentFactory->getClass('article'), $articleId);

        if ($article) {
            // Only index ghosts when the article isn't a ghost himself.
            if (LocalizationState::GHOST === $localizationState
                && LocalizationState::GHOST !== $article->getLocalizationState()->state
            ) {
                return null;
            }

            return $article;
        }

        $article = $this->documentFactory->create('article');
        $article->setId($articleId);
        $article->setUuid($document->getUuid());
        $article->setLocale($locale);

        return $article;
    }
1290316
protected function getSlug(Document $document) 
	{
		$sanitize = new Sanitize(array(
    		'removeDots' => true,
    		'keepLastDot' => true,
    		'prependRandom' => false
    	));
		$accents = new RemoveAccent();

		
		return strtolower($sanitize->filter($accents->filter($document->getTitle()), true, true, false));
	}
825713
private static function getDocumentClass(DocumentInterface $document): string
    {
        return $document instanceof ProxyInterface ? $document->getRealClass() : get_class($document);
    }
639980
public function getConcreteLocales($document)
    {
        $locales = $this->getLocales($document);

        if ($document instanceof ShadowLocaleBehavior) {
            $locales = array_diff($locales, array_keys($this->getShadowLocales($document)));
        }

        return array_values($locales);
    }
1170966
def get_localized_docstring(obj, domain):
    """"""
    if obj.__class__.__doc__ is not None:
        return inspect.cleandoc(
            gettext.dgettext(domain, obj.__class__.__doc__))
797495
public static function getDocumentCompany($document)
    {
        return $document->getDataValue('firma') ? \FlexiPeeHP\FlexiBeeRO::uncode(
                $document->getDataValue('firma')) : null;
    }
502070
private function getPageTitle(ArticleInterface $document)
    {
        $pageTitleProperty = $this->getPageTitleProperty($document);
        if (!$pageTitleProperty) {
            return;
        }

        $stagedData = $document->getStructure()->getStagedData();
        if (array_key_exists($pageTitleProperty->getName(), $stagedData)) {
            return $stagedData[$pageTitleProperty->getName()];
        }

        if (!$document->getStructure()->hasProperty($pageTitleProperty->getName())) {
            return;
        }

        return $document->getStructure()->getProperty($pageTitleProperty->getName())->getValue();
    }