Add nodeAttributes

@param \Coral\ContentBundle\Entity\NodeAttribute $nodeAttributes
@return Node
334300
public function addNodeAttribute(\Coral\ContentBundle\Entity\NodeAttribute $nodeAttributes)
    {
        $this->nodeAttributes[] = $nodeAttributes;

        return $this;
    }
135513
public function addTag($tagAttributes = array())
	{
		if (is_string($tagAttributes)) {
			$tagAttributes = array('tag' => $tagAttributes);
		}
		$tagAttributes['tag'] = $this->formatTag($tagAttributes['tag']);
		if (!array_key_exists('size', $tagAttributes)) {
			$tagAttributes = array_merge($tagAttributes, array('size' => 1));
		}
		if (!array_key_exists('tag', $tagAttributes)) {
			return false;
		}
		$tag = $tagAttributes['tag'];
		if (empty($this->_tagsArray[$tag])) {
			$this->_tagsArray[$tag] = array();
		}
		if (!empty($this->_tagsArray[$tag]['size']) && !empty($tagAttributes['size'])) {
			$tagAttributes['size'] = ($this->_tagsArray[$tag]['size'] + $tagAttributes['size']);
		} elseif (!empty($this->_tagsArray[$tag]['size'])) {
			$tagAttributes['size'] = $this->_tagsArray[$tag]['size'];
		}
		$this->_tagsArray[$tag] = $tagAttributes;
		//$this->addAttributes($tagAttributes);
		return $this->_tagsArray[$tag];
	}
371568
public function setAttribute(ChildAttribute $v = null)
    {
        if ($v === null) {
            $this->setAttributeId(NULL);
        } else {
            $this->setAttributeId($v->getId());
        }

        $this->aAttribute = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildAttribute object, it will not be re-added.
        if ($v !== null) {
            $v->addAttributeAttributeType($this);
        }


        return $this;
    }
155640
public function getNodeAttribute($key)
    {
        if (array_key_exists($key, $this->nodeAttributes)) {
            return $this->nodeAttributes[$key];
        }

        return new DataObject();
    }
578706
public function unserializeContentClassAttribute( $classAttribute, $attributeNode, $attributeParametersNode )
    {
        /** @var $domNodes DOMNodeList */
        $subTreeLimit = 0;
        $domNodes = $attributeParametersNode->getElementsByTagName( 'subtree-limit' );
        if ( $domNodes->length > 0 )
            $subTreeLimit = (int) $domNodes->item( 0 )->textContent;

        $maxTags = 0;
        $domNodes = $attributeParametersNode->getElementsByTagName( 'max-tags' );
        if ( $domNodes->length > 0 )
            $maxTags = (int) $domNodes->item( 0 )->textContent;

        $hideRootTag = 0;
        $domNodes = $attributeParametersNode->getElementsByTagName( 'hide-root-tag' );
        if ( $domNodes->length > 0 && $domNodes->item( 0 )->textContent === 'true' )
            $hideRootTag = 1;

        $editView = self::EDIT_VIEW_DEFAULT_VALUE;
        $domNodes = $attributeParametersNode->getElementsByTagName( 'edit-view' );
        if ( $domNodes->length > 0 )
        {
            $domNodeContent = trim( $domNodes->item( 0 )->textContent );
            if ( !empty( $domNodeContent ) )
            {
                $editView = $domNodeContent;
            }
        }

        $classAttribute->setAttribute( self::SUBTREE_LIMIT_FIELD, $subTreeLimit );
        $classAttribute->setAttribute( self::MAX_TAGS_FIELD, $maxTags );
        $classAttribute->setAttribute( self::HIDE_ROOT_TAG_FIELD, $hideRootTag );
        $classAttribute->setAttribute( self::EDIT_VIEW_FIELD, $editView );
    }
1331195
protected static function DOMNodeAttributes(DOMNode $node)
    {
        $attributes = array();

        foreach ($node->attributes as $attribute) {
            $attributes[$attribute->name] = $attribute->value;
        }

        return $attributes;
    }
830224
public function addNode( $nodeName, $nodeValue = false )
	{
		$newNode = new ADT_Graph_Node( $nodeName, $nodeValue );
		if( !$this->isNode( $newNode ) )
		{
			$this->nodes[] = $newNode;
			return $newNode;
		}
		else
			return $this->getNode( $nodeName );
	}
1047753
public function setAttributesValues(Collection $attributesValues)
    {
        foreach ($attributesValues as $attributeValue) {
            $this->addAttributeValue($attributeValue);
        }

        return $this;
    }
1296393
protected function mergeAttributes(array $defaultAttributes, array $newAttributes)
	{
		$attributes = array_merge($defaultAttributes, $newAttributes);
		if (isset($defaultAttributes['style'], $newAttributes['style']))
		{
			// Re-add the default attributes that were lost (but not replaced) in the merge
			$attributes['style'] += $defaultAttributes['style'];
		}

		return $attributes;
	}
1300824
public function getNodeAttributes(Node $node)
    {
        // Extract the properties of the node
        $attributes = $node->getProperties();

        // Add the node id to the attributes since \Everyman\Neo4j\Node
        // does not consider it to be a property, it is treated differently
        // and available through the getId() method.
        $attributes['id'] = $node->getId();

        return $attributes;
    }
892849
public function getChildNodes($nodeName = "", $nodeAttributes = array())
    {
        // init
        $obj = new TagCollection(); // array(); // null;
        $count = 0;

        // action
        foreach ($this->Nodes as $node) {
            if (gettype($node) == 'object'
                && get_class($node) == 'Com\PaulDevelop\Library\Modeling\Xml\Tag'
            ) {
                if ($node->Name == $nodeName) {
                    // if found child node with good name, check attributes as well
                    $allAttributesAreOK = true;
                    foreach ($nodeAttributes as $key => $value) {
                        if ($node[$key]->Value != $value) {
                            $allAttributesAreOK = false;
                            break;
                        }
                    }

                    if ($allAttributesAreOK == true) {
                        $count++;
                        $obj->add($node, $count);
                    }
                }
            }
        }

        // return
        return $obj;
    }
1065239
public function addBarNode( $attributes = array(), $priority = 100 )
    {
        $defaultAttributes = [
            'id' => false,
            'title' => false,
            'parent' => false,
            'href' => false,
            'group' => false,
            'meta' => array(),
        ];

        $attributes = array_merge($defaultAttributes,$attributes);

        add_action('admin_bar_menu', function ($wpAdminBar) use ($attributes) {

            $wpAdminBar->add_node($attributes);

        }, $priority);
    }
911631
public static function addNodeFromNode(\DOMNode $source, \DOMNode $nodeToAdd)
    {
        if ($nodeToAdd->hasChildNodes()) {
            $nodeList = $nodeToAdd->childNodes; // It is necessary because Zend Core For Oracle didn't support
            // access the property Directly.
            foreach ($nodeList as $node) {
                $owner = XmlUtil::getOwnerDocument($source);
                $newNode = $owner->importNode($node, true);
                $source->appendChild($newNode);
            }
        }
    }
749250
public function setLinkAttributes($attributes)
    {
        if (! is_array($attributes)) {
            $attributes = [$attributes];
        }

        $this->link_attributes = $attributes;

        return $this;
    }
833540
public function addNode(NodeInterface $node)
    {
        if ($this->checkChildNode($node)) {
            $this->nodes->add($node);

            $node->setPosition(count($this->getNodes()));
            $node->setParent($this);
        }

        return $this;
    }
610136
protected function addRootNodes(\DOMDocument $dom, $targetLanguage = null)
    {
        $xliff = $dom->appendChild($dom->createElement('xliff'));
        $xliff->appendChild(new \DOMAttr('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'));
        $xliff->appendChild(new \DOMAttr('version', '1.2'));

        $fileNode = $xliff->appendChild($dom->createElement('file'));
        $fileNode->appendChild(new \DOMAttr('source-language', 'en'));
        $fileNode->appendChild(new \DOMAttr('datatype', 'plaintext'));
        $fileNode->appendChild(new \DOMAttr('original', 'file.ext'));

        if (!is_null($targetLanguage)) {
            $fileNode->appendChild(new \DOMAttr('target-language', $targetLanguage));
        }

        $bodyNode =  $fileNode->appendChild($dom->createElement('body'));

        return $bodyNode;
    }
1097972
public function setCallbackAttributes($callbackAttributes)
    {
        // If it's the same as any thing in the chain, drop it.
        if ($callbackAttributes == $this->getCallbackAttributes()) {
            return $this;
        }
        $this->callbackAttributes = $callbackAttributes;

        return $this;
    }