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
114114 */
115115 protected $ _url ;
116116
117+ /**
118+ * @var ResourceModel\Category
119+ */
120+ protected $ _resource ;
121+
117122 /**
118123 * URL rewrite model
119124 *
@@ -327,6 +332,16 @@ protected function getCustomAttributesCodes()
327332 return $ this ->customAttributesCodes ;
328333 }
329334
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+
330345 /**
331346 * Get flat resource model flag
332347 *
Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ class Product extends \Magento\Catalog\Model\AbstractModel implements
117117 */
118118 protected $ _urlModel = null ;
119119
120+ /**
121+ * @var ResourceModel\Product
122+ */
123+ protected $ _resource ;
124+
120125 /**
121126 * @var string
122127 */
@@ -469,6 +474,18 @@ protected function _construct()
469474 $ this ->_init ('Magento\Catalog\Model\ResourceModel\Product ' );
470475 }
471476
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+
472489 /**
473490 * {@inheritdoc}
474491 */
You can’t perform that action at this time.
0 commit comments