Neos.Neos/Classes/EventLog/Integrations/ContentRepositoryIntegrationService.php
public function beforeAdoptNode(NodeInterface $node, Context $context, $recursive)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        if ($this->currentlyAdopting === 0) {
            /* @var $nodeEvent NodeEvent */
            $nodeEvent = $this->eventEmittingService->emit(self::NODE_ADOPT, [
                'targetWorkspace' => $context->getWorkspaceName(),
                'targetDimensions' => $context->getTargetDimensions(),
                'recursive' => $recursive
            ], NodeEvent::class);
            $nodeEvent->setNode($node);
            $this->eventEmittingService->pushContext();
        }

        $this->currentlyAdopting++;
    }
public function beforeAdoptNode(NodeInterface $node, Context $context, $recursive)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        if ($this->currentlyAdopting === 0) {
            /* @var $nodeEvent NodeEvent */
            $nodeEvent = $this->eventEmittingService->emit(self::NODE_ADOPT, [
                'targetWorkspace' => $context->getWorkspaceName(),
                'targetDimensions' => $context->getTargetDimensions(),
                'recursive' => $recursive
            ], NodeEvent::class);
            $nodeEvent->setNode($node);
            $this->eventEmittingService->pushContext();
        }

        $this->currentlyAdopting++;
    }
public function beforeAdoptNode ( NodeInterface $ node , Context $ context , $ recursive ) { if ( ! $ this -> eventEmittingService -> isEnabled ( ) ) { return ; } if ( $ this -> currentlyAdopting === 0 ) { /* @var $nodeEvent NodeEvent */ $ nodeEvent = $ this -> eventEmittingService -> emit ( self :: NODE_ADOPT , [ 'targetWorkspace' => $ context -> getWorkspaceName ( ) , 'targetDimensions' => $ context -> getTargetDimensions ( ) , 'recursive' => $ recursive ] , NodeEvent :: class ) ; $ nodeEvent -> setNode ( $ node ) ; $ this -> eventEmittingService -> pushContext ( ) ; } $ this -> currentlyAdopting ++ ; }
Emits a "Node Adopt" event

@param NodeInterface $node
@param Context $context
@param $recursive
@return void
Emits a Node Adopt event