Populates identities for stored references

@param LifecycleEventArgs $args
339256
public function postPersist(LifecycleEventArgs $args)
    {
        $object = $args->getDocument();

        if (($names = $this->referenceRepository->getReferenceNames($object)) !== false) {
            foreach ($names as $name) {
                $identity = $args->getDocumentManager()
                    ->getUnitOfWork()
                    ->getDocumentIdentifier($object);

                $this->referenceRepository->setReferenceIdentity($name, $identity);
            }
        }
    }
501016
public function postPersist(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof CommitInterface) {
            $this->dispatcher->dispatch(NewCommitEvent::NAME, new NewCommitEvent($args->getObject()));
        } elseif ($args->getObject() instanceof BranchInterface) {
            $this->dispatcher->dispatch(NewBranchEvent::NAME, new NewBranchEvent($args->getObject()));
        }
    }
981470
public function prePersist(LifecycleEventArgs $args)
    {
        $entity = $args->getEntity();

        if ($this->checkEntityType($entity)) {
            $password = $entity->getPassword();

            if (!empty($password)) {
                $encodedPassword = $this->encryptPassword($password);
                $entity->setPassword($encodedPassword);
            }
        }
    }
2498
public function preUpdate(LifecycleEventArgs $args) : void
    {
        $entity = $args->getEntity();

        if ($entity instanceof UpdatedInterface) {
            $entity->setUpdatedAt(new \DateTime());
        }
    }
120367
public function postPersist(LifecycleEventArgs $args)
    {
        $object = $args->getObject();
        if ($object instanceof UploadObjectInterface) {
            $this->storeFileUploads($object);
        }
    }
1106218
public function loadClassMetadata(LoadClassMetadataEventArgs $args)
    {
        /** @var ClassMetadata $metadata */
        $metadata = $args->getClassMetadata();
        // entity class name
        $className = $metadata->getName();

        // we load repository once per class
        if (in_array($className, $this->classesLoaded)) {
            return;
        }
        $this->classesLoaded[] = $className;

        // a custom repository class must be set and it must be in the repository pool
        if ($metadata->customRepositoryClassName and $this
                ->repositoryPool
                ->has($metadata->customRepositoryClassName)
        ) {
            // load repository from pool (hydrated by the repository compiler pass)
            $repository = $this
                ->repositoryPool
                ->get($metadata->customRepositoryClassName);

            // create entity doctrine repository
            $entityManager = $args->getEntityManager();
            $doctrineRepository = new EntityRepository($entityManager, $entityManager->getClassMetadata($className));

            // hydrate repository with doctrine data
            $repository
                ->setEntityClassName($className)
                ->setObjectManager($entityManager)
                ->setRepository($doctrineRepository)
            ;
        }
    }
1312424
public function postLoad(LifecycleEventArgs $args) {
        $entity = $args->getEntity();
        if (!$this->hasInDecodedRegistry($entity, $args->getEntityManager())) {
            if ($this->processFields($entity, false)) {
                $this->addToDecodedRegistry($entity, $args->getEntityManager());
            }
        }
    }
1279133
public function postRemove(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->postRemove($args->getObject());
        }
    }
913323
public function postLoad(LifecycleEventArgs $args)
    {
        $object = $args->getObject();
        if(get_class($object) === $this->targetClass) {
            $this->loadEntity($object);
        }
    }
139036
public function postLoad(LifecycleEventArgs $eventArgs)
    {
        $this->loadTranslation(
            $eventArgs->getEntityManager(),
            $eventArgs->getEntity(),
            $this->getLocale()
        );
    }
179620
public function postLoad(LifecycleEventArgs $args)
    {
        $entity = $args->getEntity();

        if (!$entity instanceof TranslatableInterface) {
            return;
        }

        $entity->initializeTranslations();
        $entity->setCurrentLocale($this->localeProvider->getCurrentLocale());
        $entity->setFallbackLocale($this->localeProvider->getFallbackLocale());
    }
1183508
public function postLoad(LifeCycleEventArgs $args)
    {
        $entity = $args->getEntity();

        if ($entity instanceof ValueSetInterface && $entity->getValues() !== null) {
            $this->eavManager->replaceEmptyValues($entity);
        }
    }
666392
public function onSchemaAlterTable(SchemaAlterTableEventArgs $args)
    {
        $tableDiff = $args->getTableDiff();
        $tableDiff->name = $tableDiff->fromTable->getQuotedName($args->getPlatform());
    }
130520
public function preRemove(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->preRemove($args->getObject());
        }
    }
1037506
protected function getIdentity(LifecycleEventArgs $args, $className)
    {
        return $args->getObjectManager()->getClassMetadata($className)->getIdentifierValues($args->getObject());
    }
99435
public function loadEntitiesAtLoad(LifecycleEventArgs $event)
    {
        if ($this->entityValue && $this->entityValue['entityClass']) {
            $em = $event->getEntityManager();
            if (is_array($this->entityValue) && is_array($this->entityValue['entityId'])) {
                // multiple
                $entityData = $em->getRepository($this->entityValue['entityClass'])->findById($this->entityValue['entityId']); // in this case, $this->entityValue['entityId'] contains an array of entity IDs
            } else {
                // single
                $entityData = $em->getRepository($this->entityValue['entityClass'])->findOneById($this->entityValue['entityId']);
            }

            $this->entityData = $entityData;
        } else {
            $this->entityData = null;
        }
    }
1358211
public function postPersist(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof MediaInterface) {
            $this->getProvider($args)->postPersist($args->getObject());
        }
    }