@@ -167,6 +167,8 @@ protected function _getResource()
167
167
}
168
168
169
169
/**
170
+ * Construct function
171
+ *
170
172
* @return void
171
173
*/
172
174
protected function _construct ()
@@ -215,6 +217,8 @@ public function hasValues($type = null)
215
217
}
216
218
217
219
/**
220
+ * Get values
221
+ *
218
222
* @return ProductCustomOptionValuesInterface[]|null
219
223
*/
220
224
public function getValues ()
@@ -345,7 +349,8 @@ public function groupFactory($type)
345
349
}
346
350
347
351
/**
348
- * {@inheritdoc}
352
+ * @inheritdoc
353
+ *
349
354
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
350
355
* @since 101.0.0
351
356
*/
@@ -396,6 +401,8 @@ public function beforeSave()
396
401
}
397
402
398
403
/**
404
+ * After save
405
+ *
399
406
* @return \Magento\Framework\Model\AbstractModel
400
407
* @throws \Magento\Framework\Exception\LocalizedException
401
408
*/
@@ -424,7 +431,8 @@ public function afterSave()
424
431
425
432
/**
426
433
* Return price. If $flag is true and price is percent
427
- * return converted percent to price
434
+ *
435
+ * Return converted percent to price
428
436
*
429
437
* @param bool $flag
430
438
* @return float
@@ -555,7 +563,7 @@ protected function _clearReferences()
555
563
}
556
564
557
565
/**
558
- * { @inheritdoc}
566
+ * @inheritdoc
559
567
*/
560
568
protected function _getValidationRulesBeforeSave ()
561
569
{
@@ -649,6 +657,8 @@ public function getSku()
649
657
}
650
658
651
659
/**
660
+ * Get file extension
661
+ *
652
662
* @return string|null
653
663
*/
654
664
public function getFileExtension ()
@@ -657,6 +667,8 @@ public function getFileExtension()
657
667
}
658
668
659
669
/**
670
+ * Get Max Characters
671
+ *
660
672
* @return int|null
661
673
*/
662
674
public function getMaxCharacters ()
@@ -665,6 +677,8 @@ public function getMaxCharacters()
665
677
}
666
678
667
679
/**
680
+ * Get image size X
681
+ *
668
682
* @return int|null
669
683
*/
670
684
public function getImageSizeX ()
@@ -673,6 +687,8 @@ public function getImageSizeX()
673
687
}
674
688
675
689
/**
690
+ * Get image size Y
691
+ *
676
692
* @return int|null
677
693
*/
678
694
public function getImageSizeY ()
@@ -780,6 +796,8 @@ public function setSku($sku)
780
796
}
781
797
782
798
/**
799
+ * Set File Extension
800
+ *
783
801
* @param string $fileExtension
784
802
* @return $this
785
803
*/
@@ -789,6 +807,8 @@ public function setFileExtension($fileExtension)
789
807
}
790
808
791
809
/**
810
+ * Set Max Characters
811
+ *
792
812
* @param int $maxCharacters
793
813
* @return $this
794
814
*/
@@ -798,6 +818,8 @@ public function setMaxCharacters($maxCharacters)
798
818
}
799
819
800
820
/**
821
+ * Set Image Size X
822
+ *
801
823
* @param int $imageSizeX
802
824
* @return $this
803
825
*/
@@ -807,6 +829,8 @@ public function setImageSizeX($imageSizeX)
807
829
}
808
830
809
831
/**
832
+ * Set Image Size Y
833
+ *
810
834
* @param int $imageSizeY
811
835
* @return $this
812
836
*/
@@ -816,6 +840,8 @@ public function setImageSizeY($imageSizeY)
816
840
}
817
841
818
842
/**
843
+ * Set value
844
+ *
819
845
* @param ProductCustomOptionValuesInterface[] $values
820
846
* @return $this
821
847
*/
@@ -826,7 +852,7 @@ public function setValues(array $values = null)
826
852
}
827
853
828
854
/**
829
- * { @inheritdoc}
855
+ * @inheritdoc
830
856
*
831
857
* @return \Magento\Catalog\Api\Data\ProductCustomOptionExtensionInterface|null
832
858
*/
@@ -852,6 +878,8 @@ public function getRegularPrice()
852
878
}
853
879
854
880
/**
881
+ * Get Product Option Collection
882
+ *
855
883
* @param Product $product
856
884
* @return \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
857
885
*/
@@ -882,7 +910,7 @@ public function getProductOptionCollection(Product $product)
882
910
}
883
911
884
912
/**
885
- * { @inheritdoc}
913
+ * @inheritdoc
886
914
*
887
915
* @param \Magento\Catalog\Api\Data\ProductCustomOptionExtensionInterface $extensionAttributes
888
916
* @return $this
@@ -894,6 +922,8 @@ public function setExtensionAttributes(
894
922
}
895
923
896
924
/**
925
+ * Get option repository
926
+ *
897
927
* @return Option\Repository
898
928
*/
899
929
private function getOptionRepository ()
@@ -906,6 +936,8 @@ private function getOptionRepository()
906
936
}
907
937
908
938
/**
939
+ * Get metadata pool
940
+ *
909
941
* @return \Magento\Framework\EntityManager\MetadataPool
910
942
*/
911
943
private function getMetadataPool ()
@@ -931,7 +963,7 @@ private function cleanFileExtensions()
931
963
preg_match_all ('/(?<extensions>[a-z0-9]+)/i ' , strtolower ($ rawExtensions ), $ matches );
932
964
if (!empty ($ matches )) {
933
965
$ extensions = implode (', ' , array_unique ($ matches ['extensions ' ]));
966
+ $ this ->setFileExtension ($ extensions );
934
967
}
935
- $ this ->setFileExtension ($ extensions );
936
968
}
937
969
}
0 commit comments