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 @@ -114,6 +114,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
114
114
*/
115
115
protected $ _url ;
116
116
117
+ /**
118
+ * @var ResourceModel\Category
119
+ */
120
+ protected $ _resource ;
121
+
117
122
/**
118
123
* URL rewrite model
119
124
*
@@ -327,6 +332,16 @@ protected function getCustomAttributesCodes()
327
332
return $ this ->customAttributesCodes ;
328
333
}
329
334
335
+ /**
336
+ * @throws \Magento\Framework\Exception\LocalizedException
337
+ * @return \Magento\Catalog\Model\ResourceModel\Category
338
+ * @deprecated because resource models should be used directly
339
+ */
340
+ protected function _getResource ()
341
+ {
342
+ return parent ::_getResource ();
343
+ }
344
+
330
345
/**
331
346
* Get flat resource model flag
332
347
*
Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
117
117
*/
118
118
protected $ _urlModel = null ;
119
119
120
+ /**
121
+ * @var ResourceModel\Product
122
+ */
123
+ protected $ _resource ;
124
+
120
125
/**
121
126
* @var string
122
127
*/
@@ -469,6 +474,18 @@ protected function _construct()
469
474
$ this ->_init ('Magento\Catalog\Model\ResourceModel\Product ' );
470
475
}
471
476
477
+ /**
478
+ * Get resource instance
479
+ *
480
+ * @throws \Magento\Framework\Exception\LocalizedException
481
+ * @return \Magento\Catalog\Model\ResourceModel\Product
482
+ * @deprecated because resource models should be used directly
483
+ */
484
+ protected function _getResource ()
485
+ {
486
+ return parent ::_getResource ();
487
+ }
488
+
472
489
/**
473
490
* {@inheritdoc}
474
491
*/
You can’t perform that action at this time.
0 commit comments