src/Sulu/Component/DocumentManager/DocumentRegistry.php
public function registerDocument($document, NodeInterface $node, $locale)
    {
        $oid = $this->getObjectIdentifier($document);
        $uuid = $node->getIdentifier();

        // do not allow nodes without UUIDs or reregistration of documents
        $this->validateDocumentRegistration($document, $locale, $node, $oid, $uuid);

        $this->documentMap[$oid] = $document;
        $this->documentNodeMap[$oid] = $uuid;
        $this->nodeMap[$node->getIdentifier()] = $node;
        $this->nodeDocumentMap[$this->getNodeLocaleKey($node->getIdentifier(), $locale)] = $document;
        $this->documentLocaleMap[$oid] = $locale;
    }
public function registerDocument($document, NodeInterface $node, $locale)
    {
        $oid = $this->getObjectIdentifier($document);
        $uuid = $node->getIdentifier();

        // do not allow nodes without UUIDs or reregistration of documents
        $this->validateDocumentRegistration($document, $locale, $node, $oid, $uuid);

        $this->documentMap[$oid] = $document;
        $this->documentNodeMap[$oid] = $uuid;
        $this->nodeMap[$node->getIdentifier()] = $node;
        $this->nodeDocumentMap[$this->getNodeLocaleKey($node->getIdentifier(), $locale)] = $document;
        $this->documentLocaleMap[$oid] = $locale;
    }
public function registerDocument ( $ document , NodeInterface $ node , $ locale ) { $ oid = $ this -> getObjectIdentifier ( $ document ) ; $ uuid = $ node -> getIdentifier ( ) ; // do not allow nodes without UUIDs or reregistration of documents $ this -> validateDocumentRegistration ( $ document , $ locale , $ node , $ oid , $ uuid ) ; $ this -> documentMap [ $ oid ] = $ document ; $ this -> documentNodeMap [ $ oid ] = $ uuid ; $ this -> nodeMap [ $ node -> getIdentifier ( ) ] = $ node ; $ this -> nodeDocumentMap [ $ this -> getNodeLocaleKey ( $ node -> getIdentifier ( ) , $ locale ) ] = $ document ; $ this -> documentLocaleMap [ $ oid ] = $ locale ; }
Register a document.

@param mixed $document
@param NodeInterface $node
@param NodeInterface $node
@param string $locale

@throws DocumentManagerException
Register a document .