diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php index a352c4bdf7bc3..e367405416f0d 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Links.php @@ -208,12 +208,12 @@ protected function getRecord() 'children', $record, [ - 'container_link_title' => $this->getTitleColumn(), - 'container_link_price' => $this->getPriceColumn(), - 'container_file' => $this->getFileColumn(), - 'container_sample' => $this->getSampleColumn(), - 'is_shareable' => $this->getShareableColumn(), - 'max_downloads' => $this->getMaxDownloadsColumn(), + 'container_link_title' => $this->getTitleColumn(10), + 'container_link_price' => $this->getPriceColumn(20), + 'container_file' => $this->getFileColumn(30), + 'container_sample' => $this->getSampleColumn(40), + 'is_shareable' => $this->getShareableColumn(50), + 'max_downloads' => $this->getMaxDownloadsColumn(60), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -221,9 +221,10 @@ protected function getRecord() } /** + * @param int $sortOrder * @return array */ - protected function getTitleColumn() + protected function getTitleColumn($sortOrder) { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -232,6 +233,7 @@ protected function getTitleColumn() 'label' => __('Title'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -247,9 +249,10 @@ protected function getTitleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getPriceColumn() + protected function getPriceColumn($sortOrder) { $priceContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -258,6 +261,7 @@ protected function getPriceColumn() 'label' => __('Price'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $priceField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -281,9 +285,10 @@ protected function getPriceColumn() } /** + * @param int $sortOrder * @return array */ - protected function getFileColumn() + protected function getFileColumn($sortOrder) { $fileContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -292,6 +297,7 @@ protected function getFileColumn() 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $fileTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -344,9 +350,10 @@ protected function getFileColumn() } /** + * @param int $sortOrder * @return array */ - protected function getSampleColumn() + protected function getSampleColumn($sortOrder) { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -355,6 +362,7 @@ protected function getSampleColumn() 'label' => __('Sample'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $sampleTypeField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME, @@ -403,9 +411,10 @@ protected function getSampleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getShareableColumn() + protected function getShareableColumn($sortOrder) { $shareableField['arguments']['data']['config'] = [ 'label' => __('Shareable'), @@ -413,6 +422,7 @@ protected function getShareableColumn() 'componentType' => Form\Field::NAME, 'dataType' => Form\Element\DataType\Number::NAME, 'dataScope' => 'is_shareable', + 'sortOrder' => $sortOrder, 'options' => $this->shareable->toOptionArray(), ]; @@ -420,9 +430,10 @@ protected function getShareableColumn() } /** + * @param int $sortOrder * @return array */ - protected function getMaxDownloadsColumn() + protected function getMaxDownloadsColumn($sortOrder) { $maxDownloadsContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -431,6 +442,7 @@ protected function getMaxDownloadsColumn() 'label' => __('Max. Downloads'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $numberOfDownloadsField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, diff --git a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php index 1587163ba8121..0dd94f2584218 100644 --- a/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php +++ b/app/code/Magento/Downloadable/Ui/DataProvider/Product/Form/Modifier/Samples.php @@ -183,8 +183,8 @@ protected function getRecord() 'children', $record, [ - 'container_sample_title' => $this->getTitleColumn(), - 'container_sample' => $this->getSampleColumn(), + 'container_sample_title' => $this->getTitleColumn(10), + 'container_sample' => $this->getSampleColumn(20), 'position' => $recordPosition, 'action_delete' => $recordActionDelete, ] @@ -192,9 +192,10 @@ protected function getRecord() } /** + * @param int $sortOrder * @return array */ - protected function getTitleColumn() + protected function getTitleColumn($sortOrder) { $titleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -203,6 +204,7 @@ protected function getTitleColumn() 'showLabel' => false, 'label' => __('Title'), 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $titleField['arguments']['data']['config'] = [ 'formElement' => Form\Element\Input::NAME, @@ -218,9 +220,10 @@ protected function getTitleColumn() } /** + * @param int $sortOrder * @return array */ - protected function getSampleColumn() + protected function getSampleColumn($sortOrder) { $sampleContainer['arguments']['data']['config'] = [ 'componentType' => Container::NAME, @@ -229,6 +232,7 @@ protected function getSampleColumn() 'label' => __('File'), 'showLabel' => false, 'dataScope' => '', + 'sortOrder' => $sortOrder, ]; $sampleType['arguments']['data']['config'] = [ 'formElement' => Form\Element\Select::NAME,