@@ -498,8 +498,9 @@ protected function _getResource()
498
498
}
499
499
500
500
/**
501
- * Get a list of custom attribute codes that belongs to product attribute set. If attribute set not specified for
502
- * product will return all product attribute codes
501
+ * Get a list of custom attribute codes that belongs to product attribute set.
502
+ *
503
+ * If attribute set not specified for product will return all product attribute codes
503
504
*
504
505
* @return string[]
505
506
*/
@@ -584,8 +585,9 @@ public function getPrice()
584
585
}
585
586
586
587
/**
587
- * @codeCoverageIgnoreStart
588
588
* Get visibility status
589
+ *
590
+ * @codeCoverageIgnoreStart
589
591
* @see \Magento\Catalog\Model\Product\Visibility
590
592
*
591
593
* @return int
@@ -662,6 +664,7 @@ public function getStatus()
662
664
663
665
/**
664
666
* Retrieve type instance of the product.
667
+ *
665
668
* Type instance implements product type depended logic and is a singleton shared by all products of the same type.
666
669
*
667
670
* @return \Magento\Catalog\Model\Product\Type\AbstractType
@@ -822,9 +825,10 @@ public function getStoreIds()
822
825
823
826
/**
824
827
* Retrieve product attributes
825
- * if $groupId is null - retrieve all product attributes
826
828
*
827
- * @param int $groupId Retrieve attributes of the specified group
829
+ * If $groupId is null - retrieve all product attributes
830
+ *
831
+ * @param int $groupId Retrieve attributes of the specified group
828
832
* @param bool $skipSuper Not used
829
833
* @return \Magento\Eav\Model\Entity\Attribute\AbstractAttribute[]
830
834
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
@@ -916,6 +920,7 @@ public function beforeSave()
916
920
917
921
/**
918
922
* Check/set if options can be affected when saving product
923
+ *
919
924
* If value specified, it will be set.
920
925
*
921
926
* @param bool $value
@@ -1036,6 +1041,7 @@ public function reindex()
1036
1041
1037
1042
/**
1038
1043
* Clear cache related with product and protect delete from not admin
1044
+ *
1039
1045
* Register indexing event before delete product
1040
1046
*
1041
1047
* @return \Magento\Catalog\Model\Product
@@ -1545,11 +1551,11 @@ public function hasGalleryAttribute()
1545
1551
/**
1546
1552
* Add image to media gallery
1547
1553
*
1548
- * @param string $file file path of image in file system
1549
- * @param string|array $mediaAttribute code of attribute with type 'media_image',
1550
- * leave blank if image should be only in gallery
1551
- * @param boolean $move if true, it will move source file
1552
- * @param boolean $exclude mark image as disabled in product page view
1554
+ * @param string $file file path of image in file system
1555
+ * @param string|array $mediaAttribute code of attribute with type 'media_image',
1556
+ * leave blank if image should be only in gallery
1557
+ * @param bool $move if true, it will move source file
1558
+ * @param bool $exclude mark image as disabled in product page view
1553
1559
* @return \Magento\Catalog\Model\Product
1554
1560
*/
1555
1561
public function addImageToMediaGallery ($ file , $ mediaAttribute = null , $ move = false , $ exclude = true )
@@ -1711,6 +1717,7 @@ public function getIsSalable()
1711
1717
1712
1718
/**
1713
1719
* Check is a virtual product
1720
+ *
1714
1721
* Data helper wrapper
1715
1722
*
1716
1723
* @return bool
@@ -1803,9 +1810,9 @@ public function formatUrlKey($str)
1803
1810
/**
1804
1811
* Save current attribute with code $code and assign new value
1805
1812
*
1806
- * @param string $code Attribute code
1807
- * @param mixed $value New attribute value
1808
- * @param int $store Store ID
1813
+ * @param string $code Attribute code
1814
+ * @param mixed $value New attribute value
1815
+ * @param int $store Store ID
1809
1816
* @return void
1810
1817
*/
1811
1818
public function addAttributeUpdate ($ code , $ value , $ store )
@@ -1875,6 +1882,7 @@ public function getRequestPath()
1875
1882
1876
1883
/**
1877
1884
* Custom function for other modules
1885
+ *
1878
1886
* @return string
1879
1887
*/
1880
1888
public function getGiftMessageAvailable ()
@@ -1993,6 +2001,8 @@ public function getOptions()
1993
2001
}
1994
2002
1995
2003
/**
2004
+ * Set product options
2005
+ *
1996
2006
* @param \Magento\Catalog\Api\Data\ProductCustomOptionInterface[] $options
1997
2007
* @return $this
1998
2008
*/
@@ -2016,10 +2026,10 @@ public function getIsVirtual()
2016
2026
/**
2017
2027
* Add custom option information to product
2018
2028
*
2019
- * @param string $code Option code
2020
- * @param mixed $value Value of the option
2021
- * @param int|Product $product Product ID
2022
- * @return $this
2029
+ * @param string $code Option code
2030
+ * @param mixed $value Value of the option
2031
+ * @param int|Product $product Product ID
2032
+ * @return $this
2023
2033
*/
2024
2034
public function addCustomOption ($ code , $ value , $ product = null )
2025
2035
{
@@ -2213,6 +2223,7 @@ public function getPreconfiguredValues()
2213
2223
2214
2224
/**
2215
2225
* Prepare product custom options.
2226
+ *
2216
2227
* To be sure that all product custom options does not has ID and has product instance
2217
2228
*
2218
2229
* @return \Magento\Catalog\Model\Product
@@ -2547,7 +2558,7 @@ public function setTypeId($typeId)
2547
2558
}
2548
2559
2549
2560
/**
2550
- * { @inheritdoc}
2561
+ * @inheritdoc
2551
2562
*
2552
2563
* @return \Magento\Catalog\Api\Data\ProductExtensionInterface
2553
2564
*/
@@ -2557,7 +2568,7 @@ public function getExtensionAttributes()
2557
2568
}
2558
2569
2559
2570
/**
2560
- * { @inheritdoc}
2571
+ * @inheritdoc
2561
2572
*
2562
2573
* @param \Magento\Catalog\Api\Data\ProductExtensionInterface $extensionAttributes
2563
2574
* @return $this
@@ -2570,6 +2581,8 @@ public function setExtensionAttributes(\Magento\Catalog\Api\Data\ProductExtensio
2570
2581
//@codeCoverageIgnoreEnd
2571
2582
2572
2583
/**
2584
+ * Convert array to media gallery interface
2585
+ *
2573
2586
* @param array $mediaGallery
2574
2587
* @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]
2575
2588
*/
@@ -2587,6 +2600,8 @@ protected function convertToMediaGalleryInterface(array $mediaGallery)
2587
2600
}
2588
2601
2589
2602
/**
2603
+ * Returns media gallery entries
2604
+ *
2590
2605
* @return \Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface[]|null
2591
2606
*/
2592
2607
public function getMediaGalleryEntries ()
@@ -2601,6 +2616,8 @@ public function getMediaGalleryEntries()
2601
2616
}
2602
2617
2603
2618
/**
2619
+ * Set media gallery entries
2620
+ *
2604
2621
* @param ProductAttributeMediaGalleryEntryInterface[] $mediaGalleryEntries
2605
2622
* @return $this
2606
2623
*/
@@ -2643,6 +2660,8 @@ public function setId($value)
2643
2660
}
2644
2661
2645
2662
/**
2663
+ * Returns link repository instance
2664
+ *
2646
2665
* @return ProductLinkRepositoryInterface
2647
2666
*/
2648
2667
private function getLinkRepository ()
@@ -2655,6 +2674,8 @@ private function getLinkRepository()
2655
2674
}
2656
2675
2657
2676
/**
2677
+ * Returns media gallery processor instance
2678
+ *
2658
2679
* @return Product\Gallery\Processor
2659
2680
*/
2660
2681
private function getMediaGalleryProcessor ()
0 commit comments