3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+
7
+ declare (strict_types=1 );
8
+
6
9
namespace Magento \Review \Model ;
7
10
11
+ use Magento \Framework \App \ObjectManager ;
12
+
8
13
/**
9
- * Class Rss
10
- * @package Magento\Catalog\Model\Rss\Product
14
+ * Model Rss
15
+ *
16
+ * Class \Magento\Catalog\Model\Rss\Product\Rss
11
17
*/
12
18
class Rss extends \Magento \Framework \Model \AbstractModel
13
19
{
@@ -24,18 +30,35 @@ class Rss extends \Magento\Framework\Model\AbstractModel
24
30
protected $ eventManager ;
25
31
26
32
/**
33
+ * Rss constructor.
34
+ *
27
35
* @param \Magento\Framework\Event\ManagerInterface $eventManager
28
36
* @param ReviewFactory $reviewFactory
37
+ * @param \Magento\Framework\Model\Context|null $context
38
+ * @param \Magento\Framework\Registry|null $registry
39
+ * @param \Magento\Framework\Model\ResourceModel\AbstractResource|null $resource
40
+ * @param \Magento\Framework\Data\Collection\AbstractDb|null $resourceCollection
41
+ * @param array $data
29
42
*/
30
43
public function __construct (
31
44
\Magento \Framework \Event \ManagerInterface $ eventManager ,
32
- \Magento \Review \Model \ReviewFactory $ reviewFactory
45
+ \Magento \Review \Model \ReviewFactory $ reviewFactory ,
46
+ \Magento \Framework \Model \Context $ context = null ,
47
+ \Magento \Framework \Registry $ registry = null ,
48
+ \Magento \Framework \Model \ResourceModel \AbstractResource $ resource = null ,
49
+ \Magento \Framework \Data \Collection \AbstractDb $ resourceCollection = null ,
50
+ array $ data = []
33
51
) {
34
52
$ this ->reviewFactory = $ reviewFactory ;
35
53
$ this ->eventManager = $ eventManager ;
54
+ $ context = $ context ?? ObjectManager::getInstance ()->get (\Magento \Framework \Model \Context::class);
55
+ $ registry = $ registry ?? ObjectManager::getInstance ()->get (\Magento \Framework \Registry::class);
56
+ parent ::__construct ($ context , $ registry , $ resource , $ resourceCollection , $ data );
36
57
}
37
58
38
59
/**
60
+ * Get Product Collection
61
+ *
39
62
* @return $this|\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
40
63
*/
41
64
public function getProductCollection ()
0 commit comments