This repository was archived by the owner on Apr 29, 2019. It is now read-only.
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 @@ -97,6 +97,11 @@ class Category extends \Magento\Catalog\Model\AbstractModel implements
97
97
*/
98
98
protected $ _url ;
99
99
100
+ /**
101
+ * @var ResourceModel\Category
102
+ */
103
+ protected $ _resource ;
104
+
100
105
/**
101
106
* URL rewrite model
102
107
*
@@ -313,6 +318,16 @@ protected function getCustomAttributesCodes()
313
318
return $ this ->getCustomAttributeCodes ->execute ($ this ->metadataService );
314
319
}
315
320
321
+ /**
322
+ * @throws \Magento\Framework\Exception\LocalizedException
323
+ * @return \Magento\Catalog\Model\ResourceModel\Category
324
+ * @deprecated because resource models should be used directly
325
+ */
326
+ protected function _getResource ()
327
+ {
328
+ return parent ::_getResource ();
329
+ }
330
+
316
331
/**
317
332
* Get flat resource model flag
318
333
*
Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
120
120
*/
121
121
protected $ _urlModel = null ;
122
122
123
+ /**
124
+ * @var ResourceModel\Product
125
+ */
126
+ protected $ _resource ;
127
+
123
128
/**
124
129
* @var string
125
130
*/
@@ -475,6 +480,18 @@ protected function _construct()
475
480
$ this ->_init (\Magento \Catalog \Model \ResourceModel \Product::class);
476
481
}
477
482
483
+ /**
484
+ * Get resource instance
485
+ *
486
+ * @throws \Magento\Framework\Exception\LocalizedException
487
+ * @return \Magento\Catalog\Model\ResourceModel\Product
488
+ * @deprecated because resource models should be used directly
489
+ */
490
+ protected function _getResource ()
491
+ {
492
+ return parent ::_getResource ();
493
+ }
494
+
478
495
/**
479
496
* {@inheritdoc}
480
497
*/
You can’t perform that action at this time.
0 commit comments