Neos\ContentRepository\Tests\Behavior\Features\Bootstrap\NodeOperationsTrait::iCopyANodeToPath PHP Method

iCopyANodeToPath() public method

public iCopyANodeToPath ( $position, $path, $table )
    public function iCopyANodeToPath($position, $path, $table)
    {
        if ($this->isolated === true) {
            $this->callStepInSubProcess(__METHOD__, sprintf(' %s %s %s %s %s %s', 'string', escapeshellarg($position), 'string', escapeshellarg($path), escapeshellarg(\Neos\Flow\Tests\Functional\Command\TableNode::class), escapeshellarg(json_encode($table->getHash()))));
        } else {
            $rows = $table->getHash();
            $context = $this->getContextForProperties($rows[0]);
            $node = $this->iShouldHaveOneNode();
            $referenceNode = $context->getNode($path);
            if ($position === 'into') {
                $node->copyInto($referenceNode, $node->getName() . '-1');
            } elseif ($position === 'after') {
                $node->copyAfter($referenceNode, $node->getName() . '-1');
            } else {
                $node->copyBefore($referenceNode, $node->getName() . '-1');
            }
            $this->objectManager->get(\Neos\Flow\Persistence\PersistenceManagerInterface::class)->persistAll();
            $this->resetNodeInstances();
        }
    }