Skip to content

Commit 0361e35

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr3
2 parents 4f28614 + 2028ccd commit 0361e35

File tree

32 files changed

+1402
-196
lines changed

32 files changed

+1402
-196
lines changed

app/code/Magento/Catalog/Model/Category/Attribute.php

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ class Attribute extends \Magento\Catalog\Model\Entity\Attribute implements
2929
*/
3030
public function getApplyTo()
3131
{
32-
if ($this->getData(self::APPLY_TO)) {
33-
if (is_array($this->getData(self::APPLY_TO))) {
34-
return $this->getData(self::APPLY_TO);
32+
$applyTo = $this->_getData(self::APPLY_TO);
33+
if ($applyTo) {
34+
if (is_array($applyTo)) {
35+
return $applyTo;
3536
}
36-
return explode(',', $this->getData(self::APPLY_TO));
37-
} else {
38-
return [];
37+
return explode(',', $applyTo);
3938
}
39+
40+
return [];
4041
}
4142

4243
/**
@@ -59,7 +60,7 @@ public function setApplyTo($applyTo)
5960
*/
6061
public function getIsWysiwygEnabled()
6162
{
62-
return $this->getData(self::IS_WYSIWYG_ENABLED);
63+
return $this->_getData(self::IS_WYSIWYG_ENABLED);
6364
}
6465

6566
/**
@@ -70,15 +71,15 @@ public function getIsWysiwygEnabled()
7071
*/
7172
public function setIsWysiwygEnabled($isWysiwygEnabled)
7273
{
73-
return $this->getData(self::IS_WYSIWYG_ENABLED, $isWysiwygEnabled);
74+
return $this->setData(self::IS_WYSIWYG_ENABLED, $isWysiwygEnabled);
7475
}
7576

7677
/**
7778
* {@inheritdoc}
7879
*/
7980
public function getIsHtmlAllowedOnFront()
8081
{
81-
return $this->getData(self::IS_HTML_ALLOWED_ON_FRONT);
82+
return $this->_getData(self::IS_HTML_ALLOWED_ON_FRONT);
8283
}
8384

8485
/**
@@ -97,7 +98,7 @@ public function setIsHtmlAllowedOnFront($isHtmlAllowedOnFront)
9798
*/
9899
public function getUsedForSortBy()
99100
{
100-
return $this->getData(self::USED_FOR_SORT_BY);
101+
return $this->_getData(self::USED_FOR_SORT_BY);
101102
}
102103

103104
/**
@@ -116,7 +117,7 @@ public function setUsedForSortBy($usedForSortBy)
116117
*/
117118
public function getIsFilterable()
118119
{
119-
return $this->getData(self::IS_FILTERABLE);
120+
return $this->_getData(self::IS_FILTERABLE);
120121
}
121122

122123
/**
@@ -135,31 +136,31 @@ public function setIsFilterable($isFilterable)
135136
*/
136137
public function getIsFilterableInSearch()
137138
{
138-
return $this->getData(self::IS_FILTERABLE_IN_SEARCH);
139+
return $this->_getData(self::IS_FILTERABLE_IN_SEARCH);
139140
}
140141

141142
/**
142143
* {@inheritdoc}
143144
*/
144145
public function getIsUsedInGrid()
145146
{
146-
return (bool)$this->getData(self::IS_USED_IN_GRID);
147+
return (bool)$this->_getData(self::IS_USED_IN_GRID);
147148
}
148149

149150
/**
150151
* {@inheritdoc}
151152
*/
152153
public function getIsVisibleInGrid()
153154
{
154-
return (bool)$this->getData(self::IS_VISIBLE_IN_GRID);
155+
return (bool)$this->_getData(self::IS_VISIBLE_IN_GRID);
155156
}
156157

157158
/**
158159
* {@inheritdoc}
159160
*/
160161
public function getIsFilterableInGrid()
161162
{
162-
return (bool)$this->getData(self::IS_FILTERABLE_IN_GRID);
163+
return (bool)$this->_getData(self::IS_FILTERABLE_IN_GRID);
163164
}
164165

165166
/**
@@ -170,15 +171,15 @@ public function getIsFilterableInGrid()
170171
*/
171172
public function setIsFilterableInSearch($isFilterableInSearch)
172173
{
173-
return $this->getData(self::IS_FILTERABLE_IN_SEARCH, $isFilterableInSearch);
174+
return $this->setData(self::IS_FILTERABLE_IN_SEARCH, $isFilterableInSearch);
174175
}
175176

176177
/**
177178
* {@inheritdoc}
178179
*/
179180
public function getPosition()
180181
{
181-
return $this->getData(self::POSITION);
182+
return $this->_getData(self::POSITION);
182183
}
183184

184185
/**
@@ -197,7 +198,7 @@ public function setPosition($position)
197198
*/
198199
public function getIsSearchable()
199200
{
200-
return $this->getData(self::IS_SEARCHABLE);
201+
return $this->_getData(self::IS_SEARCHABLE);
201202
}
202203

203204
/**
@@ -216,7 +217,7 @@ public function setIsSearchable($isSearchable)
216217
*/
217218
public function getIsVisibleInAdvancedSearch()
218219
{
219-
return $this->getData(self::IS_VISIBLE_IN_ADVANCED_SEARCH);
220+
return $this->_getData(self::IS_VISIBLE_IN_ADVANCED_SEARCH);
220221
}
221222

222223
/**
@@ -235,7 +236,7 @@ public function setIsVisibleInAdvancedSearch($isVisibleInAdvancedSearch)
235236
*/
236237
public function getIsComparable()
237238
{
238-
return $this->getData(self::IS_COMPARABLE);
239+
return $this->_getData(self::IS_COMPARABLE);
239240
}
240241

241242
/**
@@ -254,7 +255,7 @@ public function setIsComparable($isComparable)
254255
*/
255256
public function getIsUsedForPromoRules()
256257
{
257-
return $this->getData(self::IS_USED_FOR_PROMO_RULES);
258+
return $this->_getData(self::IS_USED_FOR_PROMO_RULES);
258259
}
259260

260261
/**
@@ -273,7 +274,7 @@ public function setIsUsedForPromoRules($isUsedForPromoRules)
273274
*/
274275
public function getIsVisibleOnFront()
275276
{
276-
return $this->getData(self::IS_VISIBLE_ON_FRONT);
277+
return $this->_getData(self::IS_VISIBLE_ON_FRONT);
277278
}
278279

279280
/**
@@ -292,7 +293,7 @@ public function setIsVisibleOnFront($isVisibleOnFront)
292293
*/
293294
public function getUsedInProductListing()
294295
{
295-
return $this->getData(self::USED_IN_PRODUCT_LISTING);
296+
return $this->_getData(self::USED_IN_PRODUCT_LISTING);
296297
}
297298

298299
/**
@@ -311,7 +312,7 @@ public function setUsedInProductListing($usedInProductListing)
311312
*/
312313
public function getIsVisible()
313314
{
314-
return $this->getData(self::IS_VISIBLE);
315+
return $this->_getData(self::IS_VISIBLE);
315316
}
316317

317318
/**
@@ -332,7 +333,7 @@ public function setIsVisible($isVisible)
332333
*/
333334
public function getScope()
334335
{
335-
$scope = $this->getData(self::KEY_IS_GLOBAL);
336+
$scope = $this->_getData(self::KEY_IS_GLOBAL);
336337
if ($scope == self::SCOPE_GLOBAL) {
337338
return self::SCOPE_GLOBAL_TEXT;
338339
} elseif ($scope == self::SCOPE_WEBSITE) {

app/code/Magento/Catalog/Model/ResourceModel/Eav/Attribute.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,11 @@ public function isEnabledInFlat()
255255
*/
256256
protected function _isEnabledInFlat()
257257
{
258-
return $this->getData('backend_type') == 'static'
258+
return $this->_getData('backend_type') == 'static'
259259
|| $this->_productFlatIndexerHelper->isAddFilterableAttributes()
260-
&& $this->getData('is_filterable') > 0
261-
|| $this->getData('used_in_product_listing') == 1
262-
|| $this->getData('used_for_sort_by') == 1;
260+
&& $this->_getData('is_filterable') > 0
261+
|| $this->_getData('used_in_product_listing') == 1
262+
|| $this->_getData('used_for_sort_by') == 1;
263263
}
264264

265265
/**
@@ -357,7 +357,7 @@ public function getStoreId()
357357
if ($dataObject) {
358358
return $dataObject->getStoreId();
359359
}
360-
return $this->getData('store_id');
360+
return $this->_getData('store_id');
361361
}
362362

363363
/**
@@ -382,7 +382,7 @@ public function getApplyTo()
382382
*/
383383
public function getSourceModel()
384384
{
385-
$model = $this->getData('source_model');
385+
$model = $this->_getData('source_model');
386386
if (empty($model)) {
387387
if ($this->getBackendType() == 'int' && $this->getFrontendInput() == 'select') {
388388
return $this->_getDefaultSourceModel();
@@ -512,127 +512,127 @@ public function getIndexType()
512512
*/
513513
public function getIsWysiwygEnabled()
514514
{
515-
return $this->getData(self::IS_WYSIWYG_ENABLED);
515+
return $this->_getData(self::IS_WYSIWYG_ENABLED);
516516
}
517517

518518
/**
519519
* {@inheritdoc}
520520
*/
521521
public function getIsHtmlAllowedOnFront()
522522
{
523-
return $this->getData(self::IS_HTML_ALLOWED_ON_FRONT);
523+
return $this->_getData(self::IS_HTML_ALLOWED_ON_FRONT);
524524
}
525525

526526
/**
527527
* {@inheritdoc}
528528
*/
529529
public function getUsedForSortBy()
530530
{
531-
return $this->getData(self::USED_FOR_SORT_BY);
531+
return $this->_getData(self::USED_FOR_SORT_BY);
532532
}
533533

534534
/**
535535
* {@inheritdoc}
536536
*/
537537
public function getIsFilterable()
538538
{
539-
return $this->getData(self::IS_FILTERABLE);
539+
return $this->_getData(self::IS_FILTERABLE);
540540
}
541541

542542
/**
543543
* {@inheritdoc}
544544
*/
545545
public function getIsFilterableInSearch()
546546
{
547-
return $this->getData(self::IS_FILTERABLE_IN_SEARCH);
547+
return $this->_getData(self::IS_FILTERABLE_IN_SEARCH);
548548
}
549549

550550
/**
551551
* {@inheritdoc}
552552
*/
553553
public function getIsUsedInGrid()
554554
{
555-
return (bool)$this->getData(self::IS_USED_IN_GRID);
555+
return (bool)$this->_getData(self::IS_USED_IN_GRID);
556556
}
557557

558558
/**
559559
* {@inheritdoc}
560560
*/
561561
public function getIsVisibleInGrid()
562562
{
563-
return (bool)$this->getData(self::IS_VISIBLE_IN_GRID);
563+
return (bool)$this->_getData(self::IS_VISIBLE_IN_GRID);
564564
}
565565

566566
/**
567567
* {@inheritdoc}
568568
*/
569569
public function getIsFilterableInGrid()
570570
{
571-
return (bool)$this->getData(self::IS_FILTERABLE_IN_GRID);
571+
return (bool)$this->_getData(self::IS_FILTERABLE_IN_GRID);
572572
}
573573

574574
/**
575575
* {@inheritdoc}
576576
*/
577577
public function getPosition()
578578
{
579-
return $this->getData(self::POSITION);
579+
return $this->_getData(self::POSITION);
580580
}
581581

582582
/**
583583
* {@inheritdoc}
584584
*/
585585
public function getIsSearchable()
586586
{
587-
return $this->getData(self::IS_SEARCHABLE);
587+
return $this->_getData(self::IS_SEARCHABLE);
588588
}
589589

590590
/**
591591
* {@inheritdoc}
592592
*/
593593
public function getIsVisibleInAdvancedSearch()
594594
{
595-
return $this->getData(self::IS_VISIBLE_IN_ADVANCED_SEARCH);
595+
return $this->_getData(self::IS_VISIBLE_IN_ADVANCED_SEARCH);
596596
}
597597

598598
/**
599599
* {@inheritdoc}
600600
*/
601601
public function getIsComparable()
602602
{
603-
return $this->getData(self::IS_COMPARABLE);
603+
return $this->_getData(self::IS_COMPARABLE);
604604
}
605605

606606
/**
607607
* {@inheritdoc}
608608
*/
609609
public function getIsUsedForPromoRules()
610610
{
611-
return $this->getData(self::IS_USED_FOR_PROMO_RULES);
611+
return $this->_getData(self::IS_USED_FOR_PROMO_RULES);
612612
}
613613

614614
/**
615615
* {@inheritdoc}
616616
*/
617617
public function getIsVisibleOnFront()
618618
{
619-
return $this->getData(self::IS_VISIBLE_ON_FRONT);
619+
return $this->_getData(self::IS_VISIBLE_ON_FRONT);
620620
}
621621

622622
/**
623623
* {@inheritdoc}
624624
*/
625625
public function getUsedInProductListing()
626626
{
627-
return $this->getData(self::USED_IN_PRODUCT_LISTING);
627+
return $this->_getData(self::USED_IN_PRODUCT_LISTING);
628628
}
629629

630630
/**
631631
* {@inheritdoc}
632632
*/
633633
public function getIsVisible()
634634
{
635-
return $this->getData(self::IS_VISIBLE);
635+
return $this->_getData(self::IS_VISIBLE);
636636
}
637637

638638
//@codeCoverageIgnoreEnd

0 commit comments

Comments
 (0)