src/EventListener/ModelRelationship/TreeEnforcingListener.php
private function handleInto(
        ModelId $into,
        RelationshipManager $relationships,
        ModelCollector $collector,
        ModelInterface $model
    ) {
        // If we have a null, it means insert into the tree root.
        if (0 === $into->getId() || null === $parent = $collector->getModel($into)) {
            $relationships->setRoot($model);
            return;
        }

        $relationships->setParent($model, $parent);
    }
private function handleInto(
        ModelId $into,
        RelationshipManager $relationships,
        ModelCollector $collector,
        ModelInterface $model
    ) {
        // If we have a null, it means insert into the tree root.
        if (0 === $into->getId() || null === $parent = $collector->getModel($into)) {
            $relationships->setRoot($model);
            return;
        }

        $relationships->setParent($model, $parent);
    }
private function handleInto ( ModelId $ into , RelationshipManager $ relationships , ModelCollector $ collector , ModelInterface $ model ) { // If we have a null, it means insert into the tree root. if ( 0 === $ into -> getId ( ) || null === $ parent = $ collector -> getModel ( $ into ) ) { $ relationships -> setRoot ( $ model ) ; return ; } $ relationships -> setParent ( $ model , $ parent ) ; }
Handle paste into.

@param ModelId             $into          The id of the new parenting model.
@param RelationshipManager $relationships The relationship manager.
@param ModelCollector      $collector     The model collector.
@param ModelInterface      $model         The model.

@return void
Handle paste into .