Skip to content

Commit 65d1acf

Browse files
committed
Merge branch 'MC-15250' of github.com:magento-obsessive-owls/magento2-page-builder into MC-15250
2 parents 48e3dd6 + fa326a1 commit 65d1acf

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

app/code/Magento/PageBuilder/Model/Catalog/Sorting/Attribute.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Attribute implements SortInterface
2323
/**
2424
* @var string
2525
*/
26-
private $sort_direction;
26+
private $sortDirection;
2727

2828
/**
2929
* @var string
@@ -32,16 +32,16 @@ class Attribute implements SortInterface
3232

3333
/**
3434
* @param string $label
35-
* @param string $sort_direction
35+
* @param string $sortDirection
3636
* @param string $attribute_field
3737
*/
3838
public function __construct(
3939
string $label,
40-
string $sort_direction,
40+
string $sortDirection,
4141
string $attribute_field
4242
) {
4343
$this->label = $label;
44-
$this->sort_direction = $sort_direction;
44+
$this->sortDirection = $sortDirection;
4545
$this->attribute_field = $attribute_field;
4646
}
4747

@@ -52,7 +52,7 @@ public function sort(
5252
\Magento\Catalog\Model\ResourceModel\Product\Collection $collection
5353
): \Magento\Catalog\Model\ResourceModel\Product\Collection {
5454
$collection->getSelect()->reset(Select::ORDER);
55-
$collection->addOrder($this->attribute_field, $this->sort_direction);
55+
$collection->addOrder($this->attribute_field, $this->sortDirection);
5656
return $collection;
5757
}
5858

app/code/Magento/PageBuilder/Model/Catalog/Sorting/Price.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,18 @@ class Price implements SortInterface
2323
/**
2424
* @var string
2525
*/
26-
private $sort_direction;
26+
private $sortDirection;
2727

2828
/**
2929
* @param string $label
30-
* @param string $sort_direction
30+
* @param string $sortDirection
3131
*/
3232
public function __construct(
3333
string $label,
34-
string $sort_direction
34+
string $sortDirection
3535
) {
3636
$this->label = $label;
37-
$this->sort_direction = $sort_direction;
37+
$this->sortDirection = $sortDirection;
3838
}
3939

4040
/**
@@ -46,7 +46,7 @@ public function sort(
4646
$collection->joinAttribute('sorting_price', 'catalog_product/price', 'entity_id', null, 'left');
4747
$collection->getSelect()
4848
->reset(Select::ORDER)
49-
->order('sorting_price '.$this->sort_direction);
49+
->order('sorting_price '.$this->sortDirection);
5050

5151
return $collection;
5252
}

app/code/Magento/PageBuilder/Model/Catalog/Sorting/Stock.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Stock implements SortInterface
2323
/**
2424
* @var string
2525
*/
26-
private $sort_direction;
26+
private $sortDirection;
2727

2828
/**
2929
* @var \Magento\Framework\Module\ModuleManagerInterface
@@ -32,16 +32,16 @@ class Stock implements SortInterface
3232

3333
/**
3434
* @param string $label
35-
* @param string $sort_direction
35+
* @param string $sortDirection
3636
* @param \Magento\Framework\Module\ModuleManagerInterface $moduleManager
3737
*/
3838
public function __construct(
3939
string $label,
40-
string $sort_direction,
40+
string $sortDirection,
4141
\Magento\Framework\Module\ModuleManagerInterface $moduleManager
4242
) {
4343
$this->label = $label;
44-
$this->sort_direction = $sort_direction;
44+
$this->sortDirection = $sortDirection;
4545
$this->moduleManager = $moduleManager;
4646
}
4747

@@ -97,7 +97,7 @@ public function sort(
9797
->group('entity_id')
9898
->having('final_qty > 0')
9999
->reset(DB\Select::ORDER)
100-
->order('final_qty '.$this->sort_direction);
100+
->order('final_qty '.$this->sortDirection);
101101

102102
$resultIds = [];
103103

app/code/Magento/PageBuilder/etc/di.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,67 +147,67 @@
147147
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Date\NewestTop" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
148148
<arguments>
149149
<argument name="label" xsi:type="string">Newest products first</argument>
150-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
150+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
151151
<argument name="attribute_field" xsi:type="string">entity_id</argument>
152152
</arguments>
153153
</virtualType>
154154
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Date\OldestTop" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
155155
<arguments>
156156
<argument name="label" xsi:type="string">Oldest products first</argument>
157-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
157+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
158158
<argument name="attribute_field" xsi:type="string">entity_id</argument>
159159
</arguments>
160160
</virtualType>
161161
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Name\Ascending" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
162162
<arguments>
163163
<argument name="label" xsi:type="string">Name: A - Z</argument>
164-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
164+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
165165
<argument name="attribute_field" xsi:type="string">name</argument>
166166
</arguments>
167167
</virtualType>
168168
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Name\Descending" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
169169
<arguments>
170170
<argument name="label" xsi:type="string">Name: Z - A</argument>
171-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
171+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
172172
<argument name="attribute_field" xsi:type="string">name</argument>
173173
</arguments>
174174
</virtualType>
175175
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Sku\Ascending" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
176176
<arguments>
177177
<argument name="label" xsi:type="string">SKU: ascending</argument>
178-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
178+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
179179
<argument name="attribute_field" xsi:type="string">sku</argument>
180180
</arguments>
181181
</virtualType>
182182
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Sku\Descending" type="Magento\PageBuilder\Model\Catalog\Sorting\Attribute">
183183
<arguments>
184184
<argument name="label" xsi:type="string">SKU: descending</argument>
185-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
185+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
186186
<argument name="attribute_field" xsi:type="string">sku</argument>
187187
</arguments>
188188
</virtualType>
189189
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Stock\Ascending" type="Magento\PageBuilder\Model\Catalog\Sorting\Stock">
190190
<arguments>
191191
<argument name="label" xsi:type="string">Stock: low stock first</argument>
192-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
192+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
193193
</arguments>
194194
</virtualType>
195195
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Stock\Descending" type="Magento\PageBuilder\Model\Catalog\Sorting\Stock">
196196
<arguments>
197197
<argument name="label" xsi:type="string">Stock: high stock first</argument>
198-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
198+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
199199
</arguments>
200200
</virtualType>
201201
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Price\HighToLow" type="Magento\PageBuilder\Model\Catalog\Sorting\Price">
202202
<arguments>
203203
<argument name="label" xsi:type="string">Price: high to low</argument>
204-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
204+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_DESC</argument>
205205
</arguments>
206206
</virtualType>
207207
<virtualType name="Magento\PageBuilder\Model\Catalog\Sorting\Price\LowToHigh" type="Magento\PageBuilder\Model\Catalog\Sorting\Price">
208208
<arguments>
209209
<argument name="label" xsi:type="string">Price: low to high</argument>
210-
<argument name="sort_direction" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
210+
<argument name="sortDirection" xsi:type="const">\Magento\Framework\DB\Select::SQL_ASC</argument>
211211
</arguments>
212212
</virtualType>
213213
<type name="Magento\PageBuilder\Model\Catalog\Sorting">

0 commit comments

Comments
 (0)