Set the node title for the newly created Document node

@param NodeInterface $node The newly created node
@param array $data incoming data from the creationDialog
@return void
543311
public function handle(NodeInterface $node, array $data)
    {
        if ($node->getNodeType()->isOfType('Neos.Neos:Document')) {
            if (isset($data['title'])) {
                $node->setProperty('title', $data['title']);
            }
            $node->setProperty('uriPathSegment', $this->nodeUriPathSegmentGenerator->generateUriPathSegment($node, (isset($data['title']) ? $data['title'] : null)));
        }
    }
293564
public function setDefaultValues(NodeInterface $node)
    {
        $nodeType = $node->getNodeType();
        foreach ($nodeType->getDefaultValuesForProperties() as $propertyName => $defaultValue) {
            $value = $node->getProperty($propertyName);
            if ((is_scalar($value) && trim($value) === '') || $value === null) {
                $node->setProperty($propertyName, $defaultValue);
            }
        }
    }
617384
public function copyToShadows($document, NodeInterface $node)
    {
        $tags = $this->getTags($node, $document->getLocale());
        $categories = $this->getCategories($node, $document->getLocale());
        $navigationContext = $this->getNavigationContext($node, $document->getLocale());

        foreach ($node->getProperties(self::SHADOW_BASE_PROPERTY) as $property) {
            if ($property->getValue() === $document->getLocale()) {
                $locale = $this->getLocale($property->getName());

                $node->setProperty(sprintf(self::TAGS_PROPERTY, $locale), $tags);
                $node->setProperty(sprintf(self::CATEGORIES_PROPERTY, $locale), $categories);
                $node->setProperty(sprintf(self::NAVIGATION_CONTEXT_PROPERTY, $locale), $navigationContext);
            }
        }
    }
1288839
public static function dump(NodeInterface $node)
	{
		$prefix = str_repeat(static::DUMP_PREFIX, $node->getLevel());
		$left = $node->getLeftValue();
		$right = $node->getRightValue();
		$level = $node->getLevel();
		$title = $node->getNodeTitle();
		$dumpData = array(
			static::DUMP_PREFIX_POS => $prefix,
			static::DUMP_LEFT_POS => $left,
			static::DUMP_RIGHT_POS => $right,
			static::DUMP_LEVEL_POS => $level,
			static::DUMP_TITLE_POS => $title
		);
		ksort($dumpData);
		$dumpString = vsprintf(static::DUMP_FORMAT, $dumpData);
		
		return $dumpString;
	}
877714
protected function applyCData(&$data, &$node)
    {
        $data['@cdata'] = $this->getBooleanAsString($data['@cdata']);

        $node->appendChild(
            $this->getDomDocument()->createCDATASection($data['@cdata'])
        );

        unset($data['@cdata']);
    }
655027
protected function setProperties(NodeInterface $node, array $context)
    {
        foreach ($this->properties as $propertyName => $propertyValue) {
            if (preg_match(\Neos\Eel\Package::EelExpressionRecognizer, $propertyValue)) {
                $this->persistenceManager->persistAll();
                $propertyValue = $this->eelEvaluationService->evaluateEelExpression($propertyValue, $context);
            }
            if ($propertyName{0} === '_') {
                ObjectAccess::setProperty($node, substr($propertyName, 1), $propertyValue);
            } else {
                $node->setProperty($propertyName, $propertyValue);
            }
        }
    }
42209
public function add(Node\NodeInterface $node)
	{
		$node->setRepository($this);
		parent::add($node);
		$this->array[] = $node;
	}
246550
private function upgradeNode(NodeInterface $node, $locale, array $properties, $up)
    {
        /** @var BasePageDocument $document */
        $document = $this->documentManager->find($node->getIdentifier(), $locale);
        $documentLocales = $this->documentInspector->getLocales($document);

        if (!in_array($locale, $documentLocales)) {
            return;
        }

        foreach ($properties as $property) {
            if ($property['property'] instanceof BlockMetadata) {
                $this->upgradeBlockProperty($property['property'], $property['components'], $node, $locale, $up);
            } else {
                $this->upgradeProperty($property['property'], $node, $locale, $up);
            }
        }

        $this->documentManager->persist($document, $locale, ['auto_name' => false]);
    }
210682
public function handle(Parser $parser, \DOMNode $node, NodeInterface $target)
    {
        $target->{$this->setterName}($this->getNodeContent($node));
    }
341776
public function nodeUpdated(NodeInterface $node)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        if (!isset($this->changedNodes[$node->getContextPath()])) {
            $this->changedNodes[$node->getContextPath()] = ['node' => $node];
        }
    }
154387
public function afterNodeCreate(NodeInterface $node)
    {
        if (!($nodeType = $node->getNodeType())) {
            return;
        }
        // array with [beforeNodes, childNodes, afterNodes] keys
        $config = $this->getAssistanceConfigForNodeType($nodeType->getName());

        switch ($nodeType->getName()) {
            case 'TYPO3.Neos.NodeTypes:Image':
                $this->configureImage($node, $nodeType, $config);
                break;

            case 'M12.Foundation:GridRow1Col':
            case 'M12.Foundation:GridRow2Col':
            case 'M12.Foundation:GridRow3Col':
            case 'M12.Foundation:GridRow4Col':
                $this->configureGridRow($node, $nodeType);
                break;

            case 'M12.Foundation:GridColumn':
                break; // assistance text nodes are created from $this->configureGridRow()

            case 'M12.Foundation:RevealModal':
                $this->configureLinkingButton($node, $nodeType, $config, 'htmlDataRevealId');
                break;

            case 'M12.Foundation:Dropdown':
            case 'M12.Foundation:DropdownContent':
                $this->configureLinkingButton($node, $nodeType, $config, 'htmlDataDropdownId');
                break;

            default:
                $this->configureCreateAssistanceChildNodes($node, $nodeType, $config);
                break;
        }
    }
724136
public function createFromNode(NodeInterface $node)
    {
        $item = $this->createItem($node->getName(), $node->getOptions());
        /* @var $childNode NodeInterface */
        foreach ($node->getChildren() as $childNode) {
            $item->addChild($this->createFromNode($childNode));
        }

        return $item;
    }
692702
private function setMessages(array $data) : void
    {
        /**
         * @var string $name
         * @var array  $errors
         */
        foreach ($data as $name => $errors) {
            // Not sure if this can be optimized and create the DOMXPath only once.
            // At this point the dom is constantly changing.
            $xpath = new DOMXPath($this->document);
            // Get all elements with the name
            $nodeList = $xpath->query(sprintf('//*[@name="%1$s"] | //*[@data-input-name="%1$s"]', $name));

            if ($nodeList->length === 0) {
                // No element found for this element ???
                continue;
            }

            // Get first element only
            $node = $nodeList->item(0);

            /** @var DOMElement $parent */
            $parent = $node->parentNode;
            if (strpos($parent->getAttribute('class'), $this->cssHasErrorClass) === false) {
                // Set error class to parent
                $class = trim($parent->getAttribute('class') . ' ' . $this->cssHasErrorClass);
                $parent->setAttribute('class', $class);
            }

            // Inject error messages
            foreach ($errors as $code => $message) {
                $div = $this->document->createElement('div');
                $div->setAttribute('class', $this->cssErrorClass);
                $div->nodeValue = $message;
                $node->parentNode->insertBefore($div, $node->nextSibling);
            }

            /** @var DOMElement $node */
            foreach ($nodeList as $node) {
                // Set aria-invalid attribute on all elements
                $node->setAttribute('aria-invalid', 'true');
            }
        }
    }
1007922
private function rename(NodeInterface $node, $name)
    {
        $names = (array) $node->getParent()->getNodeNames();
        $pos = array_search($node->getName(), $names);
        $next = isset($names[$pos + 1]) ? $names[$pos + 1] : null;

        $node->rename($name);

        if ($next) {
            $node->getParent()->orderBefore($name, $next);
        }
    }
901244
public function onDeleteNode(NodeInterface $node)
    {
        $textNode = $this->textNodeManager->findTextNodeByNode($node);

        if (null !== $textNode) {
            $this->textNodeManager->remove($textNode);
            $this->textManager->remove($textNode->getText());
        }
    }
1104727
public function add(NodeInterface $node)
	{
		$max = $this->getMax();
		$node->setLeftValue($max + 1);
		$node->setRightValue($max + 2);
		$node->setLevel(0);
	}
561706
protected function applyNamespace(&$data, &$node)
    {
        foreach($data['@ns'] as $namespace => $nsDetails)
        {
            $nsUrl = !empty($nsDetails['uri']) ? $nsDetails['uri'] : '';
            $nsQualifiedName = !empty($nsDetails['prefix']) ? $nsDetails['prefix'] : '';
            $nsContent = !empty($nsDetails['content']) ? $nsDetails['content'] : '';
            $prefixName = '' !== (string) $nsQualifiedName ? $nsQualifiedName . ':' . $namespace : $namespace;

            $node->setAttributeNS($nsUrl, $prefixName, $nsContent);
        }

        unset($data['@ns']);
    }