Neos.ContentRepository/Classes/Domain/Model/Node.php
public function setProperty($propertyName, $value): void
    {
        $this->materializeNodeDataAsNeeded();
        // Arrays could potentially contain entities and objects could be entities. In that case even if the object is the same it needs to be persisted in NodeData.
        if (!is_object($value) && !is_array($value) && $this->getProperty($propertyName) === $value) {
            return;
        }
        $oldValue = $this->hasProperty($propertyName) ? $this->getProperty($propertyName) : null;
        $this->emitBeforeNodePropertyChange($this, $propertyName, $oldValue, $value);
        $this->nodeData->setProperty($propertyName, $value);

        $this->context->getFirstLevelNodeCache()->flush();
        $this->emitNodePropertyChanged($this, $propertyName, $oldValue, $value);
        $this->emitNodeUpdated($this);
    }
public function setProperty($propertyName, $value): void
    {
        $this->materializeNodeDataAsNeeded();
        // Arrays could potentially contain entities and objects could be entities. In that case even if the object is the same it needs to be persisted in NodeData.
        if (!is_object($value) && !is_array($value) && $this->getProperty($propertyName) === $value) {
            return;
        }
        $oldValue = $this->hasProperty($propertyName) ? $this->getProperty($propertyName) : null;
        $this->emitBeforeNodePropertyChange($this, $propertyName, $oldValue, $value);
        $this->nodeData->setProperty($propertyName, $value);

        $this->context->getFirstLevelNodeCache()->flush();
        $this->emitNodePropertyChanged($this, $propertyName, $oldValue, $value);
        $this->emitNodeUpdated($this);
    }
public function setProperty ( $ propertyName , $ value ) : void { $ this -> materializeNodeDataAsNeeded ( ) ; // Arrays could potentially contain entities and objects could be entities. In that case even if the object is the same it needs to be persisted in NodeData. if ( ! is_object ( $ value ) && ! is_array ( $ value ) && $ this -> getProperty ( $ propertyName ) === $ value ) { return ; } $ oldValue = $ this -> hasProperty ( $ propertyName ) ? $ this -> getProperty ( $ propertyName ) : null ; $ this -> emitBeforeNodePropertyChange ( $ this , $ propertyName , $ oldValue , $ value ) ; $ this -> nodeData -> setProperty ( $ propertyName , $ value ) ; $ this -> context -> getFirstLevelNodeCache ( ) -> flush ( ) ; $ this -> emitNodePropertyChanged ( $ this , $ propertyName , $ oldValue , $ value ) ; $ this -> emitNodeUpdated ( $ this ) ; }
Sets the specified property.

If the node has a content object attached, the property will be set there
if it is settable.

@param string $propertyName Name of the property
@param mixed $value Value of the property
@return mixed
@throws NodeException
@throws NodeTypeNotFoundException
@throws \Neos\Flow\Property\Exception
@throws \Neos\Flow\Security\Exception
@api
Sets the specified property .