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
9797 */
9898 protected $ _url ;
9999
100+ /**
101+ * @var ResourceModel\Category
102+ */
103+ protected $ _resource ;
104+
100105 /**
101106 * URL rewrite model
102107 *
@@ -313,6 +318,16 @@ protected function getCustomAttributesCodes()
313318 return $ this ->getCustomAttributeCodes ->execute ($ this ->metadataService );
314319 }
315320
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+
316331 /**
317332 * Get flat resource model flag
318333 *
Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
120120 */
121121 protected $ _urlModel = null ;
122122
123+ /**
124+ * @var ResourceModel\Product
125+ */
126+ protected $ _resource ;
127+
123128 /**
124129 * @var string
125130 */
@@ -475,6 +480,18 @@ protected function _construct()
475480 $ this ->_init (\Magento \Catalog \Model \ResourceModel \Product::class);
476481 }
477482
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+
478495 /**
479496 * {@inheritdoc}
480497 */
You can’t perform that action at this time.
0 commit comments