src/Transfer/EzPlatform/Repository/Manager/Core/ContentTreeService.php
private function publishContentObjects(TreeObject $object)
    {
        $last = $this->objectService->createOrUpdate($object->data);

        foreach ($object->getNodes() as $subObject) {
            if ($subObject instanceof TreeObject) {
                $this->publishContentObjects($subObject);
            } else {
                /* @var ContentObject $subObject */
                $subObject->addParentLocation($last->getProperty('content_info')->mainLocationId);
                $this->objectService->createOrUpdate($subObject);
            }
        }
    }
private function publishContentObjects(TreeObject $object)
    {
        $last = $this->objectService->createOrUpdate($object->data);

        foreach ($object->getNodes() as $subObject) {
            if ($subObject instanceof TreeObject) {
                $this->publishContentObjects($subObject);
            } else {
                /* @var ContentObject $subObject */
                $subObject->addParentLocation($last->getProperty('content_info')->mainLocationId);
                $this->objectService->createOrUpdate($subObject);
            }
        }
    }
private function publishContentObjects ( TreeObject $ object ) { $ last = $ this -> objectService -> createOrUpdate ( $ object -> data ) ; foreach ( $ object -> getNodes ( ) as $ subObject ) { if ( $ subObject instanceof TreeObject ) { $ this -> publishContentObjects ( $ subObject ) ; } else { /* @var ContentObject $subObject */ $ subObject -> addParentLocation ( $ last -> getProperty ( 'content_info' ) -> mainLocationId ) ; $ this -> objectService -> createOrUpdate ( $ subObject ) ; } } }
Publishes content objects.

@param TreeObject $object

@throws \InvalidArgumentException
Publishes content objects .