Neos\ContentRepository\Domain\Model\Workspace::initializeObject PHP Method

initializeObject() public method

If this workspace is brand new, a root node is created automatically.
public initializeObject ( integer $initializationCause ) : void
$initializationCause integer
return void
    public function initializeObject($initializationCause)
    {
        if ($initializationCause === ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
            $this->rootNodeData = new NodeData('/', $this);
            $this->nodeDataRepository->add($this->rootNodeData);
            if ($this->owner instanceof UserInterface) {
                $this->setOwner($this->owner);
            }
        }
    }