Doctrine\ORM\EntityManager::remove
Removes an entity instance.
A removed entity will be removed from the database at or before transaction commit or as a result of the flush operation.
Signature
Parameters
$entity
— object- The entity instance to remove.