Doctrine\Common\Persistence\ObjectManager::persist
Tells the ObjectManager to make an instance managed and persistent.
The object will be entered into the database as a result of the flush operation. NOTE: The persist operation always considers objects that are not yet known to this ObjectManager as NEW. Do not pass detached objects to the persist operation.
Signature
Parameters
$object
— object- The instance to make managed and persistent.