Neos\ContentRepository\Domain\Model\Workspace::initializeObject PHP 메소드

initializeObject() 공개 메소드

If this workspace is brand new, a root node is created automatically.
public initializeObject ( integer $initializationCause ) : void
$initializationCause integer
리턴 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);
            }
        }
    }