File tree 3 files changed +36
-4
lines changed
CatalogSearch/Block/Advanced
3 files changed +36
-4
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
*/
Original file line number Diff line number Diff line change @@ -197,16 +197,16 @@ public function getCurrency($attribute)
197
197
public function getAttributeInputType ($ attribute )
198
198
{
199
199
$ dataType = $ attribute ->getBackend ()->getType ();
200
- $ imputType = $ attribute ->getFrontend ()->getInputType ();
201
- if ($ imputType == 'select ' || $ imputType == 'multiselect ' ) {
200
+ $ inputType = $ attribute ->getFrontend ()->getInputType ();
201
+ if ($ inputType == 'select ' || $ inputType == 'multiselect ' ) {
202
202
return 'select ' ;
203
203
}
204
204
205
- if ($ imputType == 'boolean ' ) {
205
+ if ($ inputType == 'boolean ' ) {
206
206
return 'yesno ' ;
207
207
}
208
208
209
- if ($ imputType == 'price ' ) {
209
+ if ($ inputType == 'price ' ) {
210
210
return 'price ' ;
211
211
}
212
212
You can’t perform that action at this time.
0 commit comments