@@ -208,22 +208,23 @@ protected function getRecord()
208
208
'children ' ,
209
209
$ record ,
210
210
[
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 (),
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 ),
217
217
'position ' => $ recordPosition ,
218
218
'action_delete ' => $ recordActionDelete ,
219
219
]
220
220
);
221
221
}
222
222
223
223
/**
224
+ * @param int $sortOrder
224
225
* @return array
225
226
*/
226
- protected function getTitleColumn ()
227
+ protected function getTitleColumn ($ sortOrder )
227
228
{
228
229
$ titleContainer ['arguments ' ]['data ' ]['config ' ] = [
229
230
'componentType ' => Container::NAME ,
@@ -232,6 +233,7 @@ protected function getTitleColumn()
232
233
'label ' => __ ('Title ' ),
233
234
'showLabel ' => false ,
234
235
'dataScope ' => '' ,
236
+ 'sortOrder ' => $ sortOrder ,
235
237
];
236
238
$ titleField ['arguments ' ]['data ' ]['config ' ] = [
237
239
'formElement ' => Form \Element \Input::NAME ,
@@ -247,9 +249,10 @@ protected function getTitleColumn()
247
249
}
248
250
249
251
/**
252
+ * @param int $sortOrder
250
253
* @return array
251
254
*/
252
- protected function getPriceColumn ()
255
+ protected function getPriceColumn ($ sortOrder )
253
256
{
254
257
$ priceContainer ['arguments ' ]['data ' ]['config ' ] = [
255
258
'componentType ' => Container::NAME ,
@@ -258,6 +261,7 @@ protected function getPriceColumn()
258
261
'label ' => __ ('Price ' ),
259
262
'showLabel ' => false ,
260
263
'dataScope ' => '' ,
264
+ 'sortOrder ' => $ sortOrder ,
261
265
];
262
266
$ priceField ['arguments ' ]['data ' ]['config ' ] = [
263
267
'formElement ' => Form \Element \Input::NAME ,
@@ -281,9 +285,10 @@ protected function getPriceColumn()
281
285
}
282
286
283
287
/**
288
+ * @param int $sortOrder
284
289
* @return array
285
290
*/
286
- protected function getFileColumn ()
291
+ protected function getFileColumn ($ sortOrder )
287
292
{
288
293
$ fileContainer ['arguments ' ]['data ' ]['config ' ] = [
289
294
'componentType ' => Container::NAME ,
@@ -292,6 +297,7 @@ protected function getFileColumn()
292
297
'label ' => __ ('File ' ),
293
298
'showLabel ' => false ,
294
299
'dataScope ' => '' ,
300
+ 'sortOrder ' => $ sortOrder ,
295
301
];
296
302
$ fileTypeField ['arguments ' ]['data ' ]['config ' ] = [
297
303
'formElement ' => Form \Element \Select::NAME ,
@@ -344,9 +350,10 @@ protected function getFileColumn()
344
350
}
345
351
346
352
/**
353
+ * @param int $sortOrder
347
354
* @return array
348
355
*/
349
- protected function getSampleColumn ()
356
+ protected function getSampleColumn ($ sortOrder )
350
357
{
351
358
$ sampleContainer ['arguments ' ]['data ' ]['config ' ] = [
352
359
'componentType ' => Container::NAME ,
@@ -355,6 +362,7 @@ protected function getSampleColumn()
355
362
'label ' => __ ('Sample ' ),
356
363
'showLabel ' => false ,
357
364
'dataScope ' => '' ,
365
+ 'sortOrder ' => $ sortOrder ,
358
366
];
359
367
$ sampleTypeField ['arguments ' ]['data ' ]['config ' ] = [
360
368
'formElement ' => Form \Element \Select::NAME ,
@@ -403,26 +411,29 @@ protected function getSampleColumn()
403
411
}
404
412
405
413
/**
414
+ * @param int $sortOrder
406
415
* @return array
407
416
*/
408
- protected function getShareableColumn ()
417
+ protected function getShareableColumn ($ sortOrder )
409
418
{
410
419
$ shareableField ['arguments ' ]['data ' ]['config ' ] = [
411
420
'label ' => __ ('Shareable ' ),
412
421
'formElement ' => Form \Element \Select::NAME ,
413
422
'componentType ' => Form \Field::NAME ,
414
423
'dataType ' => Form \Element \DataType \Number::NAME ,
415
424
'dataScope ' => 'is_shareable ' ,
425
+ 'sortOrder ' => $ sortOrder ,
416
426
'options ' => $ this ->shareable ->toOptionArray (),
417
427
];
418
428
419
429
return $ shareableField ;
420
430
}
421
431
422
432
/**
433
+ * @param int $sortOrder
423
434
* @return array
424
435
*/
425
- protected function getMaxDownloadsColumn ()
436
+ protected function getMaxDownloadsColumn ($ sortOrder )
426
437
{
427
438
$ maxDownloadsContainer ['arguments ' ]['data ' ]['config ' ] = [
428
439
'componentType ' => Container::NAME ,
@@ -431,6 +442,7 @@ protected function getMaxDownloadsColumn()
431
442
'label ' => __ ('Max. Downloads ' ),
432
443
'showLabel ' => false ,
433
444
'dataScope ' => '' ,
445
+ 'sortOrder ' => $ sortOrder ,
434
446
];
435
447
$ numberOfDownloadsField ['arguments ' ]['data ' ]['config ' ] = [
436
448
'formElement ' => Form \Element \Input::NAME ,
0 commit comments