Skip to content

Commit c9ca454

Browse files
authored
ENGCOM-4345: Fixed: #21278, Add sort order on downloadable links #21279
2 parents 302ec3c + 2b0cece commit c9ca454

File tree

2 files changed

+21
-9
lines changed

2 files changed

+21
-9
lines changed

app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,24 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;
78

8-
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
99
use Magento\Catalog\Model\Locator\LocatorInterface;
10+
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
1011
use Magento\Downloadable\Model\Product\Type;
11-
use Magento\Downloadable\Model\Source\TypeUpload;
1212
use Magento\Downloadable\Model\Source\Shareable;
13-
use Magento\Store\Model\StoreManagerInterface;
13+
use Magento\Downloadable\Model\Source\TypeUpload;
1414
use Magento\Framework\Stdlib\ArrayManager;
15-
use Magento\Ui\Component\DynamicRows;
1615
use Magento\Framework\UrlInterface;
16+
use Magento\Store\Model\StoreManagerInterface;
1717
use Magento\Ui\Component\Container;
18+
use Magento\Ui\Component\DynamicRows;
1819
use Magento\Ui\Component\Form;
1920

2021
/**
21-
* Class adds a grid with links
22+
* Class adds a grid with links.
23+
*
2224
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2325
*/
2426
class Links extends AbstractModifier
@@ -238,6 +240,7 @@ protected function getTitleColumn()
238240
'label' => __('Title'),
239241
'showLabel' => false,
240242
'dataScope' => '',
243+
'sortOrder' => 10,
241244
];
242245
$titleField['arguments']['data']['config'] = [
243246
'formElement' => Form\Element\Input::NAME,
@@ -267,6 +270,7 @@ protected function getPriceColumn()
267270
'label' => __('Price'),
268271
'showLabel' => false,
269272
'dataScope' => '',
273+
'sortOrder' => 20,
270274
];
271275
$priceField['arguments']['data']['config'] = [
272276
'formElement' => Form\Element\Input::NAME,
@@ -304,6 +308,7 @@ protected function getFileColumn()
304308
'label' => __('File'),
305309
'showLabel' => false,
306310
'dataScope' => '',
311+
'sortOrder' => 30,
307312
];
308313
$fileTypeField['arguments']['data']['config'] = [
309314
'formElement' => Form\Element\Select::NAME,
@@ -370,6 +375,7 @@ protected function getSampleColumn()
370375
'label' => __('Sample'),
371376
'showLabel' => false,
372377
'dataScope' => '',
378+
'sortOrder' => 40,
373379
];
374380
$sampleTypeField['arguments']['data']['config'] = [
375381
'formElement' => Form\Element\Select::NAME,
@@ -432,6 +438,7 @@ protected function getShareableColumn()
432438
'componentType' => Form\Field::NAME,
433439
'dataType' => Form\Element\DataType\Number::NAME,
434440
'dataScope' => 'is_shareable',
441+
'sortOrder' => 50,
435442
'options' => $this->shareable->toOptionArray(),
436443
];
437444

@@ -452,6 +459,7 @@ protected function getMaxDownloadsColumn()
452459
'label' => __('Max. Downloads'),
453460
'showLabel' => false,
454461
'dataScope' => '',
462+
'sortOrder' => 60,
455463
];
456464
$numberOfDownloadsField['arguments']['data']['config'] = [
457465
'formElement' => Form\Element\Input::NAME,

app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
67
namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;
78

8-
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
99
use Magento\Catalog\Model\Locator\LocatorInterface;
10+
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
1011
use Magento\Downloadable\Model\Product\Type;
1112
use Magento\Downloadable\Model\Source\TypeUpload;
12-
use Magento\Store\Model\StoreManagerInterface;
1313
use Magento\Framework\Stdlib\ArrayManager;
14-
use Magento\Ui\Component\DynamicRows;
1514
use Magento\Framework\UrlInterface;
15+
use Magento\Store\Model\StoreManagerInterface;
1616
use Magento\Ui\Component\Container;
17+
use Magento\Ui\Component\DynamicRows;
1718
use Magento\Ui\Component\Form;
1819

1920
/**
20-
* Class adds a grid with samples
21+
* Class adds a grid with samples.
22+
*
2123
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2224
*/
2325
class Samples extends AbstractModifier
@@ -209,6 +211,7 @@ protected function getTitleColumn()
209211
'showLabel' => false,
210212
'label' => __('Title'),
211213
'dataScope' => '',
214+
'sortOrder' => 10,
212215
];
213216
$titleField['arguments']['data']['config'] = [
214217
'formElement' => Form\Element\Input::NAME,
@@ -238,6 +241,7 @@ protected function getSampleColumn()
238241
'label' => __('File'),
239242
'showLabel' => false,
240243
'dataScope' => '',
244+
'sortOrder' => 20,
241245
];
242246
$sampleType['arguments']['data']['config'] = [
243247
'formElement' => Form\Element\Select::NAME,

0 commit comments

Comments
 (0)