Post update handler.

@param LifecycleEventArgs $args
176838
public function postUpdate(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->postUpdate($args->getObject());
        }
    }
1279133
public function postRemove(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface) {
            $this->getService($args)->postRemove($args->getObject());
        }
    }
120367
public function postPersist(LifecycleEventArgs $args)
    {
        $object = $args->getObject();
        if ($object instanceof UploadObjectInterface) {
            $this->storeFileUploads($object);
        }
    }
78587
public function prePersist(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof MediaInterface) {
            $this->getProvider($args)->prePersist($args->getObject());
        }
    }
974758
public function logChangeSet(LifecycleEventArgs $eventArgs)
    {
        $em            = $eventArgs->getEntityManager();
        $uow           = $em->getUnitOfWork();
        $entity        = $eventArgs->getEntity();
        $classMetadata = $em->getClassMetadata(get_class($entity));

        if ($this->isEntitySupported($classMetadata->reflClass)) {
            $uow->computeChangeSet($classMetadata, $entity);
            $changeSet = $uow->getEntityChangeSet($entity);

            $message = $entity->getUpdateLogMessage($changeSet);
            $loggerCallable = $this->loggerCallable;
            $loggerCallable($message);
        }
    }
911323
public function prePersist(LifecycleEventArgs $args): void
    {
        // Only act on invitation objects.
        $invitation = $args->getObject();
        if (!$invitation instanceof Invitation) {
            return;
        }

        // If the event author is the invitee accept the invitation.
        $event = $invitation->getEvent();
        if ($event->getAuthor() == $invitation->getInvitee()) {
            $invitation->setResponse(Invitation::RESPONSE_ACCEPT);
        }
    }
489036
public function prePersist(LifecycleEventArgs $args)
    {
        $entity        = $args->getEntity();
        $entityManager = $args->getEntityManager();

        $classMetadata = $entityManager->getClassMetadata(get_class($entity));

        if (false == $this->isModular($classMetadata)) {
            return;
        }

        if (null === $entity->getModule() && null !== $this->getModuleManager()->getCurrentModule()) {
            $entity->setModule($this->getModuleManager()->getCurrentModule());
        }
    }
737233
public function preUpdate(LifecycleEventArgs $args)
    {
        $entity = $args->getEntity();

        if (in_array('BespokeSupport\CreatedUpdatedDeletedBundle\Traits\EntityUpdatedTrait', class_uses(get_class($entity)))) {
            /**
             * @var $entity \BespokeSupport\CreatedUpdatedDeletedBundle\Traits\EntityUpdatedTrait
             */
            $entity->setUpdated(new \DateTime());
        }
    }
1050306
public function postPersist(LifecycleEventArgs $args): void
    {
        // Get the object and make sure it is what we need.
        $object = $args->getObject();
        if (!$object instanceof PublishableInterface) {
            return;
        }

        // Execute published event after the object is persisted.
        if ($object->isPublished()) {
            $event = new EntityPublishedEvent($object);
            $this->event_dispatcher->dispatch(EntityPublishedEvent::NAME, $event);
        }
    }
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());
            }
        }
    }
817252
public function postRemoveEntity(LifecycleEventArgs $eventArgs)
    {
        $file = $eventArgs->getDocument();
        if (!$file instanceof Attachment) {
            return;
        }
        
        $fileId = new \MongoId($file->getId());
        $dm = $eventArgs->getDocumentManager();
        $dm->createQueryBuilder('Cv\Entity\Cv')
           ->update()->multiple(true)
           ->field('attachments')->equals($fileId)->pull($fileId)
           ->getQuery()->execute();
    }
984975
public function prePersist(LifecycleEventArgs $eventArgs)
	{
		$entity = $eventArgs->getEntity();

		if ($entity instanceof TimestampableInterface) {
			$now = new \DateTime();
			$entity->setModificationTime($now);
			$entity->setCreationTime($now);
		}
	}
281081
private function updateViewReference(LifecycleEventArgs $eventArgs)
    {
        $entity = $eventArgs->getEntity();
        $view = null;
        $currentLocale = null;
        $translations = [];
        if ($entity instanceof WebViewInterface) {
            $translations = $entity->getTranslations();
            $view = $entity;
            $currentLocale = $view->getCurrentLocale();
        } elseif ($entity instanceof ViewTranslation && $entity->getTranslatable() instanceof WebViewInterface) {
            $translations = [$entity];
            $view = $entity->getTranslatable();
            $currentLocale = $view->getCurrentLocale();
        }

        // if a page is persisted we rebuild his viewRef
        foreach ($translations as $translation) {
            $view->setCurrentLocale($translation->getLocale());
            if ($view->getParent() && $view->getParent()->getCurrentLocale() != $translation->getLocale()) {
                $view->getParent()->translate($translation->getLocale());
                $view->getParent()->setCurrentLocale($translation->getLocale());
            }
            $event = new ViewReferenceEvent($view);
            $this->dispatcher->dispatch(ViewReferenceEvents::UPDATE_VIEW_REFERENCE, $event);
        }
        if ($view) {
            $view->setCurrentLocale($currentLocale);
        }
    }
205853
public function preTruncate(LifecycleEventArgs $args)
    {
        $connection = $args->getObjectManager()->getConnection();
        $platform   = $connection->getDatabasePlatform();

        if ($platform instanceof MySqlPlatform) {
            $connection->exec('SET foreign_key_checks = 0;');
        }
    }
1237954
public function postLoad(LifecycleEventArgs $args)
    {
        if ($args->getObject() instanceof BlockInterface && !$args->getObject() instanceof DocumentBlock) {
            $this->getService($args)->postLoad($args->getObject());
        }
    }
27005
public function prePersist(LifecycleEventArgs $args)
    {
        $entity = $args->getObject();

        if ($entity instanceof ContentRoute) {
            $template = $this->templates[$entity->getTemplateName()];

            $entity->setTemplate($template['template']);
            $entity->setController($template['controller']);
        }
    }
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);
            }
        }
    }