File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
app/code/Magento/Catalog/Model/ResourceModel/Product/Compare Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 8
8
use Magento \Customer \Model \Config \Share ;
9
9
use Magento \Store \Model \StoreManagerInterface ;
10
10
use Magento \Framework \App \ObjectManager ;
11
+ use Magento \Framework \Model \ResourceModel \Db \Context ;
11
12
12
13
/**
13
14
* Catalog compare item resource model
@@ -27,16 +28,31 @@ class Item extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
27
28
private $ storeManager ;
28
29
29
30
/**
30
- * Initialize connection
31
+ * Class constructor
31
32
*
33
+ * @param Context $context
34
+ * @param string $connectionName
32
35
* @param Share|null $share
33
36
* @param StoreManagerInterface|null $storeManager
34
- * @return void
35
37
*/
36
- protected function _construct (?Share $ share = null , ?StoreManagerInterface $ storeManager = null )
37
- {
38
+ public function __construct (
39
+ Context $ context ,
40
+ $ connectionName = null ,
41
+ ?Share $ share = null ,
42
+ ?StoreManagerInterface $ storeManager = null
43
+ ) {
38
44
$ this ->share = $ share ?? ObjectManager::getInstance ()->get (Share::class);
39
45
$ this ->storeManager = $ storeManager ?? ObjectManager::getInstance ()->get (StoreManagerInterface::class);
46
+ parent ::__construct ($ context , $ connectionName );
47
+ }
48
+
49
+ /**
50
+ * Initialize connection
51
+ *
52
+ * @return void
53
+ */
54
+ protected function _construct ()
55
+ {
40
56
$ this ->_init ('catalog_compare_item ' , 'catalog_compare_item_id ' );
41
57
}
42
58
You can’t perform that action at this time.
0 commit comments