/** * This is called for public schema when structure is changed in draft schema * @param NestedSetEventArgs $eventArgs */ public function nestedSetPostMove(NestedSetEventArgs $eventArgs) { $entity = $eventArgs->getEntity(); if ($entity instanceof FileAbstraction) { $this->regeneratePathForEntity($entity, $eventArgs); } }
/** * This is called for public schema when structure is changed in draft schema * @param NestedSetEventArgs $eventArgs */ public function nestedSetPostMove(NestedSetEventArgs $eventArgs) { $entity = $eventArgs->getEntity(); $this->em = $eventArgs->getEntityManager(); $this->unitOfWork = $this->em->getUnitOfWork(); if ($entity instanceof Page) { $changedLocalizations = $this->pageChange($entity, true); foreach ($changedLocalizations as $changedLocalization) { $this->em->flush($changedLocalization); } } }