@@ 83-91 (lines=9) @@ | ||
80 | } |
|
81 | } |
|
82 | ||
83 | public function preUpdate(LifecycleEventArgs $args) |
|
84 | { |
|
85 | $entity = $args->getEntity(); |
|
86 | ||
87 | if ($entity instanceof NodeTranslation) { |
|
88 | $this->setSlugWhenEmpty($entity, $args->getEntityManager()); |
|
89 | $this->ensureSlugIsSlugified($entity); |
|
90 | } |
|
91 | } |
|
92 | ||
93 | private function setSlugWhenEmpty(NodeTranslation $nodeTranslation, EntityManagerInterface $em) |
|
94 | { |
|
@@ 73-81 (lines=9) @@ | ||
70 | $this->pagesConfiguration = $pagesConfiguration; |
|
71 | } |
|
72 | ||
73 | public function prePersist(LifecycleEventArgs $args) |
|
74 | { |
|
75 | $entity = $args->getEntity(); |
|
76 | ||
77 | if ($entity instanceof NodeTranslation) { |
|
78 | $this->setSlugWhenEmpty($entity, $args->getEntityManager()); |
|
79 | $this->ensureSlugIsSlugified($entity); |
|
80 | } |
|
81 | } |
|
82 | ||
83 | public function preUpdate(LifecycleEventArgs $args) |
|
84 | { |