Neos.ContentRepository/Classes/Domain/Model/AbstractNodeData.php
protected function persistRelatedEntities($value)
    {
        if (!is_array($value) && !$value instanceof \Iterator) {
            $value = [$value];
        }
        foreach ($value as $element) {
            if (is_object($element) && $element instanceof PersistenceMagicInterface) {
                $this->persistenceManager->isNewObject($element) ? $this->persistenceManager->add($element) : $this->persistenceManager->update($element);
            }
        }
    }
protected function persistRelatedEntities($value)
    {
        if (!is_array($value) && !$value instanceof \Iterator) {
            $value = [$value];
        }
        foreach ($value as $element) {
            if (is_object($element) && $element instanceof PersistenceMagicInterface) {
                $this->persistenceManager->isNewObject($element) ? $this->persistenceManager->add($element) : $this->persistenceManager->update($element);
            }
        }
    }
protected function persistRelatedEntities ( $ value ) { if ( ! is_array ( $ value ) && ! $ value instanceof \ Iterator ) { $ value = [ $ value ] ; } foreach ( $ value as $ element ) { if ( is_object ( $ element ) && $ element instanceof PersistenceMagicInterface ) { $ this -> persistenceManager -> isNewObject ( $ element ) ? $ this -> persistenceManager -> add ( $ element ) : $ this -> persistenceManager -> update ( $ element ) ; } } }
Checks if a property value contains an entity and persists it.

@param mixed $value
Checks if a property value contains an entity and persists it .