Neos\ContentRepository\Domain\Model\AbstractNodeData::removeProperty PHP Method

removeProperty() public method

If the node has a content object attached, the property will not be removed on that object if it exists.
public removeProperty ( string $propertyName ) : void
$propertyName string Name of the property
return void
    public function removeProperty($propertyName)
    {
        if (!is_object($this->contentObjectProxy)) {
            if (array_key_exists($propertyName, $this->properties)) {
                unset($this->properties[$propertyName]);
                $this->addOrUpdate();
            } else {
                throw new NodeException(sprintf('Cannot remove non-existing property "%s" from node.', $propertyName), 1344952312);
            }
        }
    }