/** * Mark this entity as deleted. Deleted means that the object is marked for deletion. */ public function markAsDeleted() { if ($this->hasUnitOfWork()) { $this->unitOfWork->registerDeleted($this); } }