File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
app/code/Magento/Catalog/Model Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
112
112
*/
113
113
protected $ _url ;
114
114
115
+ /**
116
+ * @var ResourceModel\Category
117
+ */
118
+ protected $ _resource ;
119
+
115
120
/**
116
121
* URL rewrite model
117
122
*
@@ -332,6 +337,16 @@ protected function getCustomAttributesCodes()
332
337
return $ this ->customAttributesCodes ;
333
338
}
334
339
340
+ /**
341
+ * @throws \Magento\Framework\Exception\LocalizedException
342
+ * @return \Magento\Catalog\Model\ResourceModel\Category
343
+ * @deprecated because resource models should be used directly
344
+ */
345
+ protected function _getResource ()
346
+ {
347
+ return parent ::_getResource ();
348
+ }
349
+
335
350
/**
336
351
* Get flat resource model flag
337
352
*
Original file line number Diff line number Diff line change @@ -118,6 +118,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
118
118
*/
119
119
protected $ _urlModel = null ;
120
120
121
+ /**
122
+ * @var ResourceModel\Product
123
+ */
124
+ protected $ _resource ;
125
+
121
126
/**
122
127
* @var string
123
128
*/
@@ -482,6 +487,18 @@ protected function _construct()
482
487
$ this ->_init (\Magento \Catalog \Model \ResourceModel \Product::class);
483
488
}
484
489
490
+ /**
491
+ * Get resource instance
492
+ *
493
+ * @throws \Magento\Framework\Exception\LocalizedException
494
+ * @return \Magento\Catalog\Model\ResourceModel\Product
495
+ * @deprecated because resource models should be used directly
496
+ */
497
+ protected function _getResource ()
498
+ {
499
+ return parent ::_getResource ();
500
+ }
501
+
485
502
/**
486
503
* Get a list of custom attribute codes that belongs to product attribute set. If attribute set not specified for
487
504
* product will return all attribute codes
You can’t perform that action at this time.
0 commit comments