src/Sulu/Component/DocumentManager/Subscriber/Behavior/Path/AutoNameSubscriber.php
private function handleMoveCopy(MoveEvent $event)
    {
        $document = $event->getDocument();

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

        $destId = $event->getDestId();
        $node = $this->registry->getNodeForDocument($document);
        $destNode = $this->nodeManager->find($destId);
        $nodeName = $this->resolver->resolveName($destNode, $node->getName());

        $event->setDestName($nodeName);
    }
private function handleMoveCopy(MoveEvent $event)
    {
        $document = $event->getDocument();

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

        $destId = $event->getDestId();
        $node = $this->registry->getNodeForDocument($document);
        $destNode = $this->nodeManager->find($destId);
        $nodeName = $this->resolver->resolveName($destNode, $node->getName());

        $event->setDestName($nodeName);
    }
private function handleMoveCopy ( MoveEvent $ event ) { $ document = $ event -> getDocument ( ) ; if ( ! $ document instanceof AutoNameBehavior ) { return ; } $ destId = $ event -> getDestId ( ) ; $ node = $ this -> registry -> getNodeForDocument ( $ document ) ; $ destNode = $ this -> nodeManager -> find ( $ destId ) ; $ nodeName = $ this -> resolver -> resolveName ( $ destNode , $ node -> getName ( ) ) ; $ event -> setDestName ( $ nodeName ) ; }
Resolve the destination name on move and copy events.

@param MoveEvent $event
Resolve the destination name on move and copy events .