/** * Iterate over deleted aggregate root objects and process them * * @return void */ protected function processDeletedObjects() { foreach ($this->deletedEntities as $entity) { if ($this->session->hasObject($entity)) { $this->removeEntity($entity); $this->session->unregisterReconstitutedEntity($entity); $this->session->unregisterObject($entity); } } $this->deletedEntities = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); }
/** * Checks if the given object has ever been persisted. * * @param object $object The object to check * @return bool TRUE if the object is new, FALSE if the object exists in the persistence session * @api */ public function isNewObject($object) { return $this->persistenceSession->hasObject($object) === false; }
/** * Checks whether the given object is known to the identity map * * @param object $object * @return boolean * @deprecated since 6.1, will be removed two versions later, use the persistence session instead */ public function hasObject($object) { return $this->persistenceSession->hasObject($object); }