@@ -88,16 +88,6 @@ public function remove(ProductCommentCriterion $entity, bool $flush = false): vo
8888 }
8989 }
9090
91- /**
92- * @deprecated 7.0.0 - cascade remove by Entity setting instead
93- */
94- private function deleteLangs ($ criterion ): int
95- {
96- return $ this ->connection ->executeUpdate ('
97- DELETE FROM ` ' . _DB_PREFIX_ . 'product_comment_criterion_lang`
98- WHERE `id_product_comment_criterion` = ' . $ criterion ->getId ());
99- }
100-
10191 private function deleteCategories ($ criterion ): int
10292 {
10393 return $ this ->connection ->executeUpdate ('
@@ -166,34 +156,6 @@ public function update(ProductCommentCriterion $criterion): int
166156 return $ res ;
167157 }
168158
169- /**
170- * @deprecated 7.0.0 - migrated to Form\ProductCommentCriterionFormDataHandler
171- */
172- private function updateLangs ($ criterion ): int
173- {
174- $ res = 0 ;
175- $ criterionId = $ criterion ->getId ();
176- foreach ($ criterion ->getNames () as $ key => $ value ) {
177- $ qb = $ this ->connection ->createQueryBuilder ();
178- $ qb
179- ->insert (_DB_PREFIX_ . 'product_comment_criterion_lang ' )
180- ->values (
181- [
182- 'id_product_comment_criterion ' => '? ' ,
183- 'id_lang ' => '? ' ,
184- 'name ' => '? ' ,
185- ]
186- )
187- ->setParameter (0 , $ criterionId )
188- ->setParameter (1 , $ key )
189- ->setParameter (2 , $ value )
190- ;
191- $ res += $ this ->connection ->executeUpdate ($ qb ->getSQL (), $ qb ->getParameters (), $ qb ->getParameterTypes ());
192- }
193-
194- return $ res ;
195- }
196-
197159 private function updateCategories ($ criterion ): int
198160 {
199161 $ res = 0 ;
@@ -342,20 +304,4 @@ public function getTypes()
342304 3 => $ sfTranslator ->trans ('Restricted to some products ' , [], 'Modules.Productcomments.Admin ' ),
343305 ];
344306 }
345-
346- /**
347- * @return ProductCommentCriterion
348- *
349- * @deprecated 7.0.0 - use standard find() instead
350- */
351- public function findRelation ($ id_criterion )
352- {
353- if ($ id_criterion > 0 ) {
354- $ criterion = $ this ->find ($ id_criterion );
355- } else {
356- $ criterion = new ProductCommentCriterion ();
357- }
358-
359- return $ criterion ;
360- }
361307}
0 commit comments