We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d15a03d commit 0c3d681Copy full SHA for 0c3d681
app/code/Magento/Catalog/Model/Config/Source/SortOrder.php
@@ -11,6 +11,8 @@
11
*/
12
namespace Magento\Catalog\Model\Config\Source;
13
14
+use Magento\Catalog\Model\ResourceModel\Product\Collection;
15
+
16
class SortOrder implements \Magento\Framework\Data\OptionSourceInterface
17
{
18
/**
@@ -21,8 +23,8 @@ class SortOrder implements \Magento\Framework\Data\OptionSourceInterface
21
23
public function toOptionArray(): array
22
24
25
return [
- ['value' => 'ASC', 'label' => __('Ascending')],
- ['value' => 'DESC', 'label' => __('Descending')],
26
+ ['value' => Collection::SORT_ORDER_ASC, 'label' => __('Ascending')],
27
+ ['value' => Collection::SORT_ORDER_DESC, 'label' => __('Descending')],
28
];
29
}
30
0 commit comments