Skip to content

Commit b7ad075

Browse files
mahesh-rajawatmage2pratik
authored andcommitted
backward compatibilty fixed
1 parent f80d382 commit b7ad075

File tree

2 files changed

+24
-32
lines changed

2 files changed

+24
-32
lines changed

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

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -208,23 +208,22 @@ protected function getRecord()
208208
'children',
209209
$record,
210210
[
211-
'container_link_title' => $this->getTitleColumn(10),
212-
'container_link_price' => $this->getPriceColumn(20),
213-
'container_file' => $this->getFileColumn(30),
214-
'container_sample' => $this->getSampleColumn(40),
215-
'is_shareable' => $this->getShareableColumn(50),
216-
'max_downloads' => $this->getMaxDownloadsColumn(60),
211+
'container_link_title' => $this->getTitleColumn(),
212+
'container_link_price' => $this->getPriceColumn(),
213+
'container_file' => $this->getFileColumn(),
214+
'container_sample' => $this->getSampleColumn(),
215+
'is_shareable' => $this->getShareableColumn(),
216+
'max_downloads' => $this->getMaxDownloadsColumn(),
217217
'position' => $recordPosition,
218218
'action_delete' => $recordActionDelete,
219219
]
220220
);
221221
}
222222

223223
/**
224-
* @param int $sortOrder
225224
* @return array
226225
*/
227-
protected function getTitleColumn($sortOrder)
226+
protected function getTitleColumn()
228227
{
229228
$titleContainer['arguments']['data']['config'] = [
230229
'componentType' => Container::NAME,
@@ -233,7 +232,7 @@ protected function getTitleColumn($sortOrder)
233232
'label' => __('Title'),
234233
'showLabel' => false,
235234
'dataScope' => '',
236-
'sortOrder' => $sortOrder,
235+
'sortOrder' => 10,
237236
];
238237
$titleField['arguments']['data']['config'] = [
239238
'formElement' => Form\Element\Input::NAME,
@@ -249,10 +248,9 @@ protected function getTitleColumn($sortOrder)
249248
}
250249

251250
/**
252-
* @param int $sortOrder
253251
* @return array
254252
*/
255-
protected function getPriceColumn($sortOrder)
253+
protected function getPriceColumn()
256254
{
257255
$priceContainer['arguments']['data']['config'] = [
258256
'componentType' => Container::NAME,
@@ -261,7 +259,7 @@ protected function getPriceColumn($sortOrder)
261259
'label' => __('Price'),
262260
'showLabel' => false,
263261
'dataScope' => '',
264-
'sortOrder' => $sortOrder,
262+
'sortOrder' => 20,
265263
];
266264
$priceField['arguments']['data']['config'] = [
267265
'formElement' => Form\Element\Input::NAME,
@@ -285,10 +283,9 @@ protected function getPriceColumn($sortOrder)
285283
}
286284

287285
/**
288-
* @param int $sortOrder
289286
* @return array
290287
*/
291-
protected function getFileColumn($sortOrder)
288+
protected function getFileColumn()
292289
{
293290
$fileContainer['arguments']['data']['config'] = [
294291
'componentType' => Container::NAME,
@@ -297,7 +294,7 @@ protected function getFileColumn($sortOrder)
297294
'label' => __('File'),
298295
'showLabel' => false,
299296
'dataScope' => '',
300-
'sortOrder' => $sortOrder,
297+
'sortOrder' => 30,
301298
];
302299
$fileTypeField['arguments']['data']['config'] = [
303300
'formElement' => Form\Element\Select::NAME,
@@ -350,10 +347,9 @@ protected function getFileColumn($sortOrder)
350347
}
351348

352349
/**
353-
* @param int $sortOrder
354350
* @return array
355351
*/
356-
protected function getSampleColumn($sortOrder)
352+
protected function getSampleColumn()
357353
{
358354
$sampleContainer['arguments']['data']['config'] = [
359355
'componentType' => Container::NAME,
@@ -362,7 +358,7 @@ protected function getSampleColumn($sortOrder)
362358
'label' => __('Sample'),
363359
'showLabel' => false,
364360
'dataScope' => '',
365-
'sortOrder' => $sortOrder,
361+
'sortOrder' => 40,
366362
];
367363
$sampleTypeField['arguments']['data']['config'] = [
368364
'formElement' => Form\Element\Select::NAME,
@@ -411,29 +407,27 @@ protected function getSampleColumn($sortOrder)
411407
}
412408

413409
/**
414-
* @param int $sortOrder
415410
* @return array
416411
*/
417-
protected function getShareableColumn($sortOrder)
412+
protected function getShareableColumn()
418413
{
419414
$shareableField['arguments']['data']['config'] = [
420415
'label' => __('Shareable'),
421416
'formElement' => Form\Element\Select::NAME,
422417
'componentType' => Form\Field::NAME,
423418
'dataType' => Form\Element\DataType\Number::NAME,
424419
'dataScope' => 'is_shareable',
425-
'sortOrder' => $sortOrder,
420+
'sortOrder' => 50,
426421
'options' => $this->shareable->toOptionArray(),
427422
];
428423

429424
return $shareableField;
430425
}
431426

432427
/**
433-
* @param int $sortOrder
434428
* @return array
435429
*/
436-
protected function getMaxDownloadsColumn($sortOrder)
430+
protected function getMaxDownloadsColumn()
437431
{
438432
$maxDownloadsContainer['arguments']['data']['config'] = [
439433
'componentType' => Container::NAME,
@@ -442,7 +436,7 @@ protected function getMaxDownloadsColumn($sortOrder)
442436
'label' => __('Max. Downloads'),
443437
'showLabel' => false,
444438
'dataScope' => '',
445-
'sortOrder' => $sortOrder,
439+
'sortOrder' => 60,
446440
];
447441
$numberOfDownloadsField['arguments']['data']['config'] = [
448442
'formElement' => Form\Element\Input::NAME,

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

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -183,19 +183,18 @@ protected function getRecord()
183183
'children',
184184
$record,
185185
[
186-
'container_sample_title' => $this->getTitleColumn(10),
187-
'container_sample' => $this->getSampleColumn(20),
186+
'container_sample_title' => $this->getTitleColumn(),
187+
'container_sample' => $this->getSampleColumn(),
188188
'position' => $recordPosition,
189189
'action_delete' => $recordActionDelete,
190190
]
191191
);
192192
}
193193

194194
/**
195-
* @param int $sortOrder
196195
* @return array
197196
*/
198-
protected function getTitleColumn($sortOrder)
197+
protected function getTitleColumn()
199198
{
200199
$titleContainer['arguments']['data']['config'] = [
201200
'componentType' => Container::NAME,
@@ -204,7 +203,7 @@ protected function getTitleColumn($sortOrder)
204203
'showLabel' => false,
205204
'label' => __('Title'),
206205
'dataScope' => '',
207-
'sortOrder' => $sortOrder,
206+
'sortOrder' => 10,
208207
];
209208
$titleField['arguments']['data']['config'] = [
210209
'formElement' => Form\Element\Input::NAME,
@@ -220,10 +219,9 @@ protected function getTitleColumn($sortOrder)
220219
}
221220

222221
/**
223-
* @param int $sortOrder
224222
* @return array
225223
*/
226-
protected function getSampleColumn($sortOrder)
224+
protected function getSampleColumn()
227225
{
228226
$sampleContainer['arguments']['data']['config'] = [
229227
'componentType' => Container::NAME,
@@ -232,7 +230,7 @@ protected function getSampleColumn($sortOrder)
232230
'label' => __('File'),
233231
'showLabel' => false,
234232
'dataScope' => '',
235-
'sortOrder' => $sortOrder,
233+
'sortOrder' => 20,
236234
];
237235
$sampleType['arguments']['data']['config'] = [
238236
'formElement' => Form\Element\Select::NAME,

0 commit comments

Comments
 (0)