Just create one, the attributes will be set automatically

@return Webforge\CMS\Navigation\Node
773995
public function createNewNode(stdClass $jsonNode) {
    $nodeClass = $this->container->getRoleFQN('NavigationNode');
    $node = new $nodeClass((array) $jsonNode->title);
    $node->generateSlugs();
    $defaultSlug = current($node->getI18nSlug());  // not matter what current language is, this is the default language

    $page = $this->createNewPage($defaultSlug);
    $this->dc->getEntityManager()->persist($page);

    $node->setPage($page);

    return $node;
  }
342582
public function actionCreate()
    {
        if (!\Yii::$app->user->can('create'))
            return $this->alert(Module::t('core', 'Access denied.'));

        $model = new Rubric();
        $request = \Yii::$app->getRequest();
        $loaded = $model->load($request->post());
        
        // prependTo() call validate() and save()
        if ($loaded && $model->prependTo($this->findModel($model->parent_node))) {
            return $this->redirect(['index']);
        } else {
            return $this->renderAjax('create', [
                'model' => $model,
            ]);
        }
    }
1128339
public function parents()
    {
        if (!$this->nodes) {
            throw new \InvalidArgumentException('The current node list is empty.');
        }

        $node = $this->getNode(0);
        $nodes = array();

        while ($node = $node->parentNode) {
            if (XML_ELEMENT_NODE === $node->nodeType) {
                $nodes[] = $node;
            }
        }

        return $this->createSubCrawler($nodes);
    }
824200
public function build()
    {
        if(($document = $this->getDocument()) === null) {
            $document = $this->loader->getInstance(NodeLoader::DOCUMENT_NODE);
            $this->setDocument($document);
        }

        if(($header = $document->getHeader()) === null) {
            $header = $this->loader->getInstance(NodeLoader::HEADER_NODE);
            $document->setHeader($header);
        }

        if(($supplier = $header->getSupplier()) === null) {
            $supplier = $this->loader->getInstance(NodeLoader::SUPPLIER_NODE);
            $header->setSupplier($supplier);
        }

        if(($catalog = $header->getCatalog()) === null) {
            $catalog = $this->loader->getInstance(NodeLoader::CATALOG_NODE);
            $header->setCatalog($catalog);
        }

        if(($datetime = $catalog->getDateTime()) === null) {
            $datetime = $this->loader->getInstance(NodeLoader::DATE_TIME_NODE);
            $catalog->setDateTime($datetime);
        }

        if(($newCatalog = $document->getNewCatalog()) === null) {
            $newCatalog = $this->loader->getInstance(NodeLoader::NEW_CATALOG_NODE);
            $document->setNewCatalog($newCatalog);
        }

        return $document;
    }
985559
public function parent() {
		$parent = $this->domnode;
		if(!$parent)
			return new Node(null);
		while(true) {
			$parent = $parent->parentNode;
			if(!$parent)
				return;
			if($parent->nodeType == XML_ELEMENT_NODE)
				return new Node($parent);
		}
	}
697394
public function create()
    {
        // Keep default options in an array and merge with incoming options that can override the defaults.
        $default = array(
            'id'          => null,
            'class'       => null,
            'wrapper'     => 'nav',
            'create_url'  => function ($url) {
                return $url;
            },
        );
        $menu = array_replace_recursive($default, $this->config);

        // Create the ul li menu from the array, use an anonomous recursive function that returns an
        // array of values.
        $createMenu = function ($items, $callback) use (&$createMenu, $menu) {
            
            $html = null;
            $hasItemIsSelected = false;

            foreach ($items as $item) {

                // has submenu, call recursivly and keep track on if the submenu has a selected item in it.
                $submenu        = null;
                $selectedParent = null;
            
                if (isset($item['submenu'])) {
                    list($submenu, $selectedParent) = $createMenu($item['submenu']['items'], $callback);
                    $selectedParent = $selectedParent
                        ? "selected-parent "
                        : null;
                }

                // Check if the current menuitem is selected
                $selected = $callback($item['url'])
                    ? "selected "
                    : null;
                
                // Check if the menuitem is a parent of current page, /controller for /controller/action
                $isParent = null;
                if (isset($item['mark-if-parent-of']) && $item['mark-if-parent-of'] == true) {
                    $isParent = $menu['is_parent']($item['mark-if-parent-of'])
                        ? "is-parent "
                        : null;
                }
                
                // Is there a class set for this item, then use it
                $class = isset($item['class']) && ! is_null($item['class'])
                    ? $item['class']
                    : null;

                // Prepare the class-attribute, if used
                $class = ($selected || $selectedParent || $isParent || $class)
                    ? " class='{$selected}{$selectedParent}{$isParent}{$class}' "
                    : null;

                // Add the menu item
                $url = $menu['create_url']($item['url']);
                $html .= "\n<li{$class}><a href='{$url}' title='{$item['title']}'>{$item['text']}</a>{$submenu}</li>\n";
                
                // To remember there is selected children when going up the menu hierarchy
                if ($selected) {
                    $hasItemIsSelected = true;
                }
            }

            // Return the menu
            return array("\n<ul>$html</ul>\n", $hasItemIsSelected);
        };

        // Call the anonomous function to create the menu, and submenues if any.
        list($html) = $createMenu($menu['items'], $menu['callback']);


        // Set the id & class element, only if it exists in the menu-array
        $id      = isset($menu['id'])    ? " id='{$menu['id']}'"       : null;
        $class   = isset($menu['class']) ? " class='{$menu['class']}'" : null;
        $wrapper = $menu['wrapper'];

        return "\n<{$wrapper}{$id}{$class}>{$html}</{$wrapper}>\n";
    }
754920
public function actionCreatePage()
    {
        $this->menuFlush();
        $model = new Nav();
        $fromDraft = $this->postArg('use_draft');
        $parentNavId = $this->postArg('parent_nav_id');
        $navContainerId = $this->postArg('nav_container_id');
        
        if (!empty($parentNavId)) {
            $navContainerId = Nav::findOne($parentNavId)->nav_container_id;
        }
        
        if (!empty($fromDraft)) {
            $create = $model->createPageFromDraft($parentNavId, $navContainerId, $this->postArg('lang_id'), $this->postArg('title'), $this->postArg('alias'), $this->postArg('description'), $this->postArg('from_draft_id'), $this->postArg('is_draft'));
        } else {
            $create = $model->createPage($parentNavId, $navContainerId, $this->postArg('lang_id'), $this->postArg('title'), $this->postArg('alias'), $this->postArg('layout_id'), $this->postArg('description'), $this->postArg('is_draft'));
        }
        
        if (is_array($create)) {
            Yii::$app->response->statusCode = 422;
        }
        
        return $create;
    }
1166732
public function build(): RequestChildNodesRequest
	{
		$instance = new RequestChildNodesRequest();
		if ($this->nodeId === null) {
			throw new BuilderException('Property [nodeId] is required.');
		}
		$instance->nodeId = $this->nodeId;
		$instance->depth = $this->depth;
		$instance->pierce = $this->pierce;
		return $instance;
	}
504017
public function create()
    {
        /**
         * @var Attribute $attribute
         */
        $classNamespace = $this->getEntityNamespace();
        $attribute = new $classNamespace();
        $attribute->setEnabled(true)
            ->setValues(new ArrayCollection())
            ->setCreatedAt($this->now());

        return $attribute;
    }
844991
public function create()
    {
        $instance = self::createBraintreeGateway($this);
        $this->setId($instance->getId());
        return $instance;
    }
664479
public function buildTree()
	{
		if( !$this->path )																			//  no Path to read is set
			throw new RuntimeException( 'No path set' );											//  exit
		$tree	= $this->buildRecursive( $this->path );												//  build HTML Tree recursively
		if( $this->id )																				//  an ID for Tree is set
			$tree	= UI_HTML_Tag::create( 'div', $tree, array( 'id' => $this->id ) );				//  wrap Tree in DIV with ID
		return $tree;																				//  return finished HTML Tree
	}
1306395
private function createDomXpath()
    {
        $xpath = new \DOMXPath($this->document);

        if ($this->xml_mode) { // register all name spaces
            foreach ($xpath->query('namespace::*') as $node) {
                if ($node->prefix !== 'xml') {
                    $xpath->registerNamespace($node->prefix, $node->namespaceURI);
                }
            }
        }

        return $xpath;
    }
1050670
public function build()
    {
        foreach ($this->child as $element) {
            $element->build();
            $this->node->appendChild($element->getNode());
        }

        return $this;
    }
232504
public function makeRoot()
    {
        if ($this->getLeftValue() || $this->getRightValue()) {
            throw new PropelException('Cannot turn an existing node into a root node.');
        }

        $this->setLeftValue(1);
        $this->setRightValue(2);
        $this->setLevel(0);

        return $this;
    }
296762
protected function addMigrationsNode()
    {
        $builder = new TreeBuilder();
        $node = $builder->root('migrations');

        $node->isRequired()
            ->children()
                ->scalarNode('directory')->defaultValue('migrations')->end()
                ->scalarNode('namespace')->defaultValue('Migrations')->end()
            ->end()
        ->end();

        return $node;
    }
914538
public function addChild(Node $node) : self
    {
        $node->setParent($this);
        $this->children[] = $node;

        return $this;
    }
929845
public static function fromNode(Node $node): self
    {
        return new self($node::schema()->getQName(), (string)$node->get('_id'));
    }