Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: #21278, Add sort order on downloadable links #21279

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,24 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Downloadable\Model\Product\Type;
use Magento\Downloadable\Model\Source\TypeUpload;
use Magento\Downloadable\Model\Source\Shareable;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Downloadable\Model\Source\TypeUpload;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\DynamicRows;
use Magento\Framework\UrlInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\DynamicRows;
use Magento\Ui\Component\Form;

/**
* Class adds a grid with links
* Class adds a grid with links.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Links extends AbstractModifier
Expand Down Expand Up @@ -238,6 +240,7 @@ protected function getTitleColumn()
'label' => __('Title'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 10,
];
$titleField['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
Expand Down Expand Up @@ -267,6 +270,7 @@ protected function getPriceColumn()
'label' => __('Price'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 20,
];
$priceField['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
Expand Down Expand Up @@ -304,6 +308,7 @@ protected function getFileColumn()
'label' => __('File'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 30,
];
$fileTypeField['arguments']['data']['config'] = [
'formElement' => Form\Element\Select::NAME,
Expand Down Expand Up @@ -370,6 +375,7 @@ protected function getSampleColumn()
'label' => __('Sample'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 40,
];
$sampleTypeField['arguments']['data']['config'] = [
'formElement' => Form\Element\Select::NAME,
Expand Down Expand Up @@ -432,6 +438,7 @@ protected function getShareableColumn()
'componentType' => Form\Field::NAME,
'dataType' => Form\Element\DataType\Number::NAME,
'dataScope' => 'is_shareable',
'sortOrder' => 50,
'options' => $this->shareable->toOptionArray(),
];

Expand All @@ -452,6 +459,7 @@ protected function getMaxDownloadsColumn()
'label' => __('Max. Downloads'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 60,
];
$numberOfDownloadsField['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

namespace Magento\Downloadable\Ui\DataProvider\Product\Form\Modifier;

use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Catalog\Model\Locator\LocatorInterface;
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
use Magento\Downloadable\Model\Product\Type;
use Magento\Downloadable\Model\Source\TypeUpload;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Framework\Stdlib\ArrayManager;
use Magento\Ui\Component\DynamicRows;
use Magento\Framework\UrlInterface;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Ui\Component\Container;
use Magento\Ui\Component\DynamicRows;
use Magento\Ui\Component\Form;

/**
* Class adds a grid with samples
* Class adds a grid with samples.
*
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
*/
class Samples extends AbstractModifier
Expand Down Expand Up @@ -209,6 +211,7 @@ protected function getTitleColumn()
'showLabel' => false,
'label' => __('Title'),
'dataScope' => '',
'sortOrder' => 10,
];
$titleField['arguments']['data']['config'] = [
'formElement' => Form\Element\Input::NAME,
Expand Down Expand Up @@ -238,6 +241,7 @@ protected function getSampleColumn()
'label' => __('File'),
'showLabel' => false,
'dataScope' => '',
'sortOrder' => 20,
];
$sampleType['arguments']['data']['config'] = [
'formElement' => Form\Element\Select::NAME,
Expand Down