Beispiel #1
0
 /**
  * Returns the removed objects determined by a comparison of the clean property value
  * with the actual property value.
  *
  * @param \TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object The object
  * @param string $propertyName
  * @return array An array of removed objects
  */
 protected function getRemovedChildObjects(\TYPO3\CMS\Extbase\DomainObject\DomainObjectInterface $object, $propertyName)
 {
     $removedObjects = array();
     $cleanPropertyValue = $object->_getCleanProperty($propertyName);
     if (is_array($cleanPropertyValue) || $cleanPropertyValue instanceof \Iterator) {
         $propertyValue = $object->_getProperty($propertyName);
         foreach ($cleanPropertyValue as $containedObject) {
             if (!$propertyValue->contains($containedObject)) {
                 $removedObjects[] = $containedObject;
             }
         }
     }
     return $removedObjects;
 }
 /**
  * @return boolean
  */
 protected function isStorageAlreadyMemorizedInParentCleanState()
 {
     return $this->parentObject->_getCleanProperty($this->propertyName) === $this;
 }