Neos.ContentRepository/Classes/Domain/Service/NodeService.php
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);
            }
        }
    }
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);
            }
        }
    }
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 ) ; } } }
Sets default node property values on the given node.

@param NodeInterface $node
@return void
Sets default node property values on the given node .