Add dimensions to the node.

@param NodeData $node
@return void
515510
public function execute(NodeData $node)
    {
        $dimensionValuesToBeAdded = $node->getDimensionValues();

        foreach ($this->dimensionValues as $dimensionName => $dimensionValues) {
            if (!isset($dimensionValuesToBeAdded[$dimensionName])) {
                if (is_array($dimensionValues)) {
                    $dimensionValuesToBeAdded[$dimensionName] = $dimensionValues;
                } else {
                    $dimensionValuesToBeAdded[$dimensionName] = [$dimensionValues];
                }
            }
        }

        if ($this->addDefaultDimensionValues === true) {
            $configuredDimensions = $this->contentDimensionRepository->findAll();
            foreach ($configuredDimensions as $configuredDimension) {
                if (!isset($dimensionValuesToBeAdded[$configuredDimension->getIdentifier()])) {
                    $dimensionValuesToBeAdded[$configuredDimension->getIdentifier()] = [$configuredDimension->getDefault()];
                }
            }
        }

        $dimensionsToBeSet = [];
        foreach ($dimensionValuesToBeAdded as $dimensionName => $dimensionValues) {
            foreach ($dimensionValues as $dimensionValue) {
                $dimensionsToBeSet[] = new NodeDimension($node, $dimensionName, $dimensionValue);
            }
        }

        $node->setDimensions($dimensionsToBeSet);
    }
832777
protected function createContextMatchingNodeData(NodeData $nodeData)
    {
        $nodePath = NodePaths::getRelativePathBetween(SiteService::SITES_ROOT_PATH, $nodeData->getPath());
        list($siteNodeName) = explode('/', $nodePath);
        $site = $this->_siteRepository->findOneByNodeName($siteNodeName);

        $contextProperties = [
            'workspaceName' => $nodeData->getWorkspace()->getName(),
            'invisibleContentShown' => true,
            'inaccessibleContentShown' => true,
            'removedContentShown' => true,
            'dimensions' => $nodeData->getDimensionValues(),
            'currentSite' => $site
        ];

        if ($site instanceof Site && $domain = $site->getFirstActiveDomain()) {
            $contextProperties['currentDomain'] = $domain;
        }

        return $this->_contextFactory->create($contextProperties);
    }
1287465
protected function addData($key, $data = null)
    {
        $this->data[self::RS_KEY_DATA]->{$key} = $data;
    }
991903
public function addNodeList(\DOMNodeList $nodes)
    {
        foreach ($nodes as $node) {
            if ($node instanceof \DOMNode) {
                $this->addNode($node);
            }
        }
    }
626483
public function addData($data) : void
    {
        Assert::isInstanceOfAny($data, [Chunk::class, X509Certificate::class]);
        $this->data[] = $data;
    }
313170
public function Add( $node )
	{
		if ( ! $node instanceof AbstractNode )
		{
			$node = $this->Create( $this->_context, $node );
		}

		if ( ! is_null( $node->getParent() ) )
		{
			throw new ArgumentException( "\$node" );
		}

		$node->setParent( $this );

		if ( is_null( $this->_childs ) )
		{
			$this->_childs = array(); // new List<AbstractNode>();
		}

		$this->_childs[] = $node;
	}
480286
public void add(final T node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            this.lastNode.setNext( node );
            node.setPrevious( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
125835
public function addChild(RouteTreeNode $node)
    {
        $hash = $node->getFirstMatcher()->getHash();

        $this->children[$hash] = $node;
    }
903994
protected function collateNamespaces(\DOMNode $node)
    {
        if ($this->config['useNamespaces'] && $node->namespaceURI 
            && ! array_key_exists($node->namespaceURI, $this->namespaces)) {
            $this->namespaces[$node->namespaceURI] = $node->lookupPrefix($node->namespaceURI);
        }
    }
1280217
public void addLast(final T node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            T currentLast = this.lastNode;
            currentLast.setNext( node );
            node.setPrevious( currentLast );
            this.lastNode = node;            
        }
        
        this.size++;
    }
603965
public function addChildAsLast(Node $node)
    {
        if(null === $this->children)
        {
            $this->children = array();
        }

        $this->children[] = $node;
    }
1104727
public function add(NodeInterface $node)
	{
		$max = $this->getMax();
		$node->setLeftValue($max + 1);
		$node->setRightValue($max + 2);
		$node->setLevel(0);
	}
1364921
protected function assertIsNodeSupported(Node $node): void
    {
        if (!$this->isNodeSupported($node)) {
            $class = ClassUtils::getShortName(static::class);
            throw new InvalidArgumentException(
                "Node [{$node::schema()->getCurie()}] not supported by [{$class}]."
            );
        }
    }
58204
public function enterNode(Node $node)
    {
        if ($node instanceof Namespace_) {
            $this->namespace = isset($node->name) ? $node->name->parts : [];
        }
    }
562679
protected function applyAttributes(&$data, &$node)
    {
        if(isset($data['@attrib']))
        {
            foreach($data['@attrib'] as $key => $value)
            {
                if(true === $this->isValidElementName($key))
                {
                    $value = $this->getBooleanAsString($value);

                    $node->setAttribute($key, $value);
                }
                else
                {
                    throw new InvalidArgumentException(
                        sprintf('Illegal character in attribute (%s) name', $key)
                    );
                }
            }

            unset($data['@attrib']);
        }
    }
912871
public void add(final ObjectSinkNode node) {
        if ( this.firstNode == null ) {
            this.firstNode = node;
            this.lastNode = node;
        } else {
            this.lastNode.setNextObjectSinkNode( node );
            node.setPreviousObjectSinkNode( this.lastNode );
            this.lastNode = node;
        }
        this.size++;
    }
28670
public function execute(NodeData $node)
    {
        foreach ($node->getNodeType()->getProperties() as $propertyName => $propertyConfiguration) {
            if (isset($propertyConfiguration['type']) && in_array(trim($propertyConfiguration['type']), $this->getHandledObjectTypes())) {
                if (!isset($nodeProperties)) {
                    $nodeRecordQuery = $this->entityManager->getConnection()->prepare('SELECT properties FROM typo3_typo3cr_domain_model_nodedata WHERE persistence_object_identifier=?');
                    $nodeRecordQuery->execute([$this->persistenceManager->getIdentifierByObject($node)]);
                    $nodeRecord = $nodeRecordQuery->fetch(\PDO::FETCH_ASSOC);
                    $nodeProperties = unserialize($nodeRecord['properties']);
                }

                if (!isset($nodeProperties[$propertyName]) || !is_object($nodeProperties[$propertyName])) {
                    continue;
                }

                /** @var Asset $assetObject */
                $assetObject = $nodeProperties[$propertyName];
                $nodeProperties[$propertyName] = null;

                $stream = $assetObject->getResource()->getStream();

                if ($stream === false) {
                    continue;
                }

                fclose($stream);
                $objectType = TypeHandling::getTypeForValue($assetObject);
                $objectIdentifier = ObjectAccess::getProperty($assetObject, 'Persistence_Object_Identifier', true);

                $nodeProperties[$propertyName] = [
                    '__flow_object_type' => $objectType,
                    '__identifier' => $objectIdentifier
                ];
            }
        }

        if (isset($nodeProperties)) {
            $nodeUpdateQuery = $this->entityManager->getConnection()->prepare('UPDATE typo3_typo3cr_domain_model_nodedata SET properties=? WHERE persistence_object_identifier=?');
            $nodeUpdateQuery->execute([serialize($nodeProperties), $this->persistenceManager->getIdentifierByObject($node)]);
        }
    }