|  | @@ 247-258 (lines=12) @@ | 
                                                            
                                    | 244 |  | 	 * | 
                                                            
                                    | 245 |  | 	 * @return void | 
                                                            
                                    | 246 |  | 	 */ | 
                                                            
                                    | 247 |  | 	public function preUpdate($entity, ORM\Event\LifecycleEventArgs $eventArgs) | 
                                                            
                                    | 248 |  | 	{ | 
                                                            
                                    | 249 |  | 		$em = $eventArgs->getEntityManager(); | 
                                                            
                                    | 250 |  | 		$uow = $em->getUnitOfWork(); | 
                                                            
                                    | 251 |  | 		$classMetadata = $em->getClassMetadata(get_class($entity)); | 
                                                            
                                    | 252 |  |  | 
                                                            
                                    | 253 |  | 		if ($config = $this->driver->getObjectConfigurations($em, $classMetadata->getName())) { | 
                                                            
                                    | 254 |  | 			if (isset($config['update'])) { | 
                                                            
                                    | 255 |  | 				$this->updateFields($config['update'], $uow, $entity, $classMetadata); | 
                                                            
                                    | 256 |  | 			} | 
                                                            
                                    | 257 |  | 		} | 
                                                            
                                    | 258 |  | 	} | 
                                                            
                                    | 259 |  |  | 
                                                            
                                    | 260 |  | 	/** | 
                                                            
                                    | 261 |  | 	 * @param mixed $entity | 
                                                                                
                                |  | @@ 266-277 (lines=12) @@ | 
                                                            
                                    | 263 |  | 	 * | 
                                                            
                                    | 264 |  | 	 * @return void | 
                                                            
                                    | 265 |  | 	 */ | 
                                                            
                                    | 266 |  | 	public function preRemove($entity, ORM\Event\LifecycleEventArgs $eventArgs) | 
                                                            
                                    | 267 |  | 	{ | 
                                                            
                                    | 268 |  | 		$em = $eventArgs->getEntityManager(); | 
                                                            
                                    | 269 |  | 		$uow = $em->getUnitOfWork(); | 
                                                            
                                    | 270 |  | 		$classMetadata = $em->getClassMetadata(get_class($entity)); | 
                                                            
                                    | 271 |  |  | 
                                                            
                                    | 272 |  | 		if ($config = $this->driver->getObjectConfigurations($em, $classMetadata->getName())) { | 
                                                            
                                    | 273 |  | 			if (isset($config['delete'])) { | 
                                                            
                                    | 274 |  | 				$this->updateFields($config['delete'], $uow, $entity, $classMetadata); | 
                                                            
                                    | 275 |  | 			} | 
                                                            
                                    | 276 |  | 		} | 
                                                            
                                    | 277 |  | 	} | 
                                                            
                                    | 278 |  |  | 
                                                            
                                    | 279 |  | 	/** | 
                                                            
                                    | 280 |  | 	 * Set a custom representation of current user |