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

persistRelatedEntities() protected method

Checks if a property value contains an entity and persists it.
protected persistRelatedEntities ( mixed $value )
$value mixed
    protected function persistRelatedEntities($value)
    {
        if (!is_array($value) && !$value instanceof \Iterator) {
            $value = array($value);
        }
        foreach ($value as $element) {
            if (is_object($element) && $element instanceof PersistenceMagicInterface) {
                $this->persistenceManager->isNewObject($element) ? $this->persistenceManager->add($element) : $this->persistenceManager->update($element);
            }
        }
    }