Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php
public function beforeNodeCopy(NodeInterface $sourceNode, NodeInterface $targetParentNode)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        if ($this->currentlyCopying) {
            throw new \Exception('TODO: already copying...');
        }

        $this->currentlyCopying = true;

        /* @var $nodeEvent NodeEvent */
        $nodeEvent = $this->eventEmittingService->emit(self::NODE_COPY, [
            'copiedInto' => $targetParentNode->getContextPath()
        ], NodeEvent::class);
        $nodeEvent->setNode($sourceNode);
        $this->eventEmittingService->pushContext();
    }
public function beforeNodeCopy(NodeInterface $sourceNode, NodeInterface $targetParentNode)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        if ($this->currentlyCopying) {
            throw new \Exception('TODO: already copying...');
        }

        $this->currentlyCopying = true;

        /* @var $nodeEvent NodeEvent */
        $nodeEvent = $this->eventEmittingService->emit(self::NODE_COPY, [
            'copiedInto' => $targetParentNode->getContextPath()
        ], NodeEvent::class);
        $nodeEvent->setNode($sourceNode);
        $this->eventEmittingService->pushContext();
    }
public function beforeNodeCopy ( NodeInterface $ sourceNode , NodeInterface $ targetParentNode ) { if ( ! $ this -> eventEmittingService -> isEnabled ( ) ) { return ; } if ( $ this -> currentlyCopying ) { throw new \ Exception ( 'TODO: already copying...' ) ; } $ this -> currentlyCopying = true ; /* @var $nodeEvent NodeEvent */ $ nodeEvent = $ this -> eventEmittingService -> emit ( self :: NODE_COPY , [ 'copiedInto' => $ targetParentNode -> getContextPath ( ) ] , NodeEvent :: class ) ; $ nodeEvent -> setNode ( $ sourceNode ) ; $ this -> eventEmittingService -> pushContext ( ) ; }
Emits a "Node Copy" event

@param NodeInterface $sourceNode
@param NodeInterface $targetParentNode
@return void
@throws \Exception
Emits a Node Copy event