Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 0c2fa6f

Browse files
🔃 [EngCom] Public Pull Requests - 2.3-develop
Accepted Public Pull Requests: - magento/magento2#16573: Setting deploy mode to production with --skip-compilation flag should� (by @gelanivishal) - magento/magento2#16546: Properly hyphenate "third-party" (by @ronak2ram) - magento/magento2#16537: Issue in adding the wishlist of "zero price" product (by @gelanivishal) - magento/magento2#16520: [Forwardport] fix: change "My Dashboard" to "My Account", fixes #16007 (by @DanielRuf) - magento/magento2#16504: [Forwardport] Admin controller product set save refactor (by @AnshuMishra17) - magento/magento2#16228: [Forwardport] #16079 translation possibility for moreButtonText (by @Karlasa) - magento/magento2#13501: [Improvement] Implement customer group grid on ui component (by @simpleadm) Fixed GitHub Issues: - magento/magento2#16479: Issue in adding the wishlist of "zero price" product. (reported by @Sathishkumar8731) has been fixed in magento/magento2#16537 by @gelanivishal in 2.3-develop branch Related commits: 1. 4cb997a - magento/magento2#16079: Need information about translating issue (Magento Swatches Js) (reported by @mageho) has been fixed in magento/magento2#16228 by @Karlasa in 2.3-develop branch Related commits: 1. abcded5 2. 988ef89
2 parents 6b8f59c + 540a6af commit 0c2fa6f

File tree

29 files changed

+703
-86
lines changed

29 files changed

+703
-86
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
433433
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
434434
<comment>
435-
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).]]>
435+
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
436436
</comment>
437437
</field>
438438
<field id="redirect_to_base" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ Web,Web
405405
"Url Options","Url Options"
406406
"Add Store Code to Urls","Add Store Code to Urls"
407407
"
408-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
408+
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
409409
","
410-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third party services (e.g. PayPal etc.).
410+
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
411411
"
412412
"Auto-redirect to Base URL","Auto-redirect to Base URL"
413413
"Search Engine Optimization","Search Engine Optimization"
@@ -447,7 +447,7 @@ Tags,Tags
447447
"<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>","<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>"
448448
"Community Edition","Community Edition"
449449
"Default Theme","Default Theme"
450-
"If no value is specified, the system default is used. The system default may be modified by third party extensions.","If no value is specified, the system default is used. The system default may be modified by third party extensions."
450+
"If no value is specified, the system default is used. The system default may be modified by third-party extensions.","If no value is specified, the system default is used. The system default may be modified by third-party extensions."
451451
"Applied Theme","Applied Theme"
452452
"Design Rule","Design Rule"
453453
"User Agent Rules","User Agent Rules"

app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</settings>
1313
<field name="theme_theme_id" sortOrder="10" formElement="select">
1414
<settings>
15-
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third party extensions.</notice>
15+
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third-party extensions.</notice>
1616
<dataType>text</dataType>
1717
<label translate="true">Applied Theme</label>
1818
<dataScope>theme_theme_id</dataScope>

app/code/Magento/Catalog/Controller/Adminhtml/Product/Set/Save.php

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
*/
77
namespace Magento\Catalog\Controller\Adminhtml\Product\Set;
88

9+
use Magento\Framework\App\ObjectManager;
10+
11+
/**
12+
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
13+
*/
914
class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
1015
{
1116
/**
@@ -17,22 +22,49 @@ class Save extends \Magento\Catalog\Controller\Adminhtml\Product\Set
1722
* @var \Magento\Framework\Controller\Result\JsonFactory
1823
*/
1924
protected $resultJsonFactory;
20-
25+
26+
/*
27+
* @var \Magento\Eav\Model\Entity\Attribute\SetFactory
28+
*/
29+
private $attributeSetFactory;
30+
31+
/*
32+
* @var \Magento\Framework\Filter\FilterManager
33+
*/
34+
private $filterManager;
35+
36+
/*
37+
* @var \Magento\Framework\Json\Helper\Data
38+
*/
39+
private $jsonHelper;
40+
2141
/**
2242
* @param \Magento\Backend\App\Action\Context $context
2343
* @param \Magento\Framework\Registry $coreRegistry
2444
* @param \Magento\Framework\View\LayoutFactory $layoutFactory
2545
* @param \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
46+
* @param \Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory
47+
* @param \Magento\Framework\Filter\FilterManager $filterManager
48+
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
2649
*/
2750
public function __construct(
2851
\Magento\Backend\App\Action\Context $context,
2952
\Magento\Framework\Registry $coreRegistry,
3053
\Magento\Framework\View\LayoutFactory $layoutFactory,
31-
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory
54+
\Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory,
55+
\Magento\Eav\Model\Entity\Attribute\SetFactory $attributeSetFactory = null,
56+
\Magento\Framework\Filter\FilterManager $filterManager = null,
57+
\Magento\Framework\Json\Helper\Data $jsonHelper = null
3258
) {
3359
parent::__construct($context, $coreRegistry);
3460
$this->layoutFactory = $layoutFactory;
3561
$this->resultJsonFactory = $resultJsonFactory;
62+
$this->attributeSetFactory = $attributeSetFactory ?: ObjectManager::getInstance()
63+
->get(\Magento\Eav\Model\Entity\Attribute\SetFactory::class);
64+
$this->filterManager = $filterManager ?: ObjectManager::getInstance()
65+
->get(\Magento\Framework\Filter\FilterManager::class);
66+
$this->jsonHelper = $jsonHelper ?: ObjectManager::getInstance()
67+
->get(\Magento\Framework\Json\Helper\Data::class);
3668
}
3769

3870
/**
@@ -65,16 +97,12 @@ public function execute()
6597
$isNewSet = $this->getRequest()->getParam('gotoEdit', false) == '1';
6698

6799
/* @var $model \Magento\Eav\Model\Entity\Attribute\Set */
68-
$model = $this->_objectManager->create(\Magento\Eav\Model\Entity\Attribute\Set::class)
69-
->setEntityTypeId($entityTypeId);
70-
71-
/** @var $filterManager \Magento\Framework\Filter\FilterManager */
72-
$filterManager = $this->_objectManager->get(\Magento\Framework\Filter\FilterManager::class);
100+
$model = $this->attributeSetFactory->create()->setEntityTypeId($entityTypeId);
73101

74102
try {
75103
if ($isNewSet) {
76104
//filter html tags
77-
$name = $filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
105+
$name = $this->filterManager->stripTags($this->getRequest()->getParam('attribute_set_name'));
78106
$model->setAttributeSetName(trim($name));
79107
} else {
80108
if ($attributeSetId) {
@@ -85,11 +113,10 @@ public function execute()
85113
__('This attribute set no longer exists.')
86114
);
87115
}
88-
$data = $this->_objectManager->get(\Magento\Framework\Json\Helper\Data::class)
89-
->jsonDecode($this->getRequest()->getPost('data'));
116+
$data = $this->jsonHelper->jsonDecode($this->getRequest()->getPost('data'));
90117

91118
//filter html tags
92-
$data['attribute_set_name'] = $filterManager->stripTags($data['attribute_set_name']);
119+
$data['attribute_set_name'] = $this->filterManager->stripTags($data['attribute_set_name']);
93120

94121
$model->organizeData($data);
95122
}

app/code/Magento/Catalog/Pricing/Price/RegularPrice.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ class RegularPrice extends AbstractPrice implements BasePriceProviderInterface
2222
/**
2323
* Get price value
2424
*
25-
* @return float|bool
25+
* @return float
2626
*/
2727
public function getValue()
2828
{
2929
if ($this->value === null) {
3030
$price = $this->product->getPrice();
3131
$priceInCurrentCurrency = $this->priceCurrency->convertAndRound($price);
32-
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : false;
32+
$this->value = $priceInCurrentCurrency ? floatval($priceInCurrentCurrency) : 0;
3333
}
3434
return $this->value;
3535
}

app/code/Magento/Customer/Model/ResourceModel/Group/Collection.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
*/
1313
class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
1414
{
15+
/**
16+
* @var string
17+
*/
18+
protected $_idFieldName = 'customer_group_id';
19+
1520
/**
1621
* Resource initialization
1722
*

app/code/Magento/Customer/Model/ResourceModel/Group/Grid/Collection.php

Lines changed: 129 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,62 @@
77
*/
88
namespace Magento\Customer\Model\ResourceModel\Group\Grid;
99

10-
class Collection extends \Magento\Customer\Model\ResourceModel\Group\Collection
10+
use Magento\Customer\Model\ResourceModel\Group\Collection as GroupCollection;
11+
use Magento\Framework\Api\Search\SearchResultInterface;
12+
use Magento\Framework\Search\AggregationInterface;
13+
14+
/**
15+
* Collection for displaying grid of customer groups
16+
*/
17+
class Collection extends GroupCollection implements SearchResultInterface
1118
{
19+
/**
20+
* @var AggregationInterface
21+
*/
22+
protected $aggregations;
23+
24+
/**
25+
* @param \Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory
26+
* @param \Psr\Log\LoggerInterface $logger
27+
* @param \Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy
28+
* @param \Magento\Framework\Event\ManagerInterface $eventManager
29+
* @param string $mainTable
30+
* @param string $eventPrefix
31+
* @param string $eventObject
32+
* @param string $resourceModel
33+
* @param string $model
34+
* @param \Magento\Framework\DB\Adapter\AdapterInterface|string|null $connection
35+
* @param \Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource
36+
*
37+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
38+
*/
39+
public function __construct(
40+
\Magento\Framework\Data\Collection\EntityFactoryInterface $entityFactory,
41+
\Psr\Log\LoggerInterface $logger,
42+
\Magento\Framework\Data\Collection\Db\FetchStrategyInterface $fetchStrategy,
43+
\Magento\Framework\Event\ManagerInterface $eventManager,
44+
$mainTable,
45+
$eventPrefix,
46+
$eventObject,
47+
$resourceModel,
48+
$model = \Magento\Framework\View\Element\UiComponent\DataProvider\Document::class,
49+
$connection = null,
50+
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null
51+
) {
52+
parent::__construct(
53+
$entityFactory,
54+
$logger,
55+
$fetchStrategy,
56+
$eventManager,
57+
$connection,
58+
$resource
59+
);
60+
$this->_eventPrefix = $eventPrefix;
61+
$this->_eventObject = $eventObject;
62+
$this->_init($model, $resourceModel);
63+
$this->setMainTable($mainTable);
64+
}
65+
1266
/**
1367
* Resource initialization
1468
* @return $this
@@ -19,4 +73,78 @@ protected function _initSelect()
1973
$this->addTaxClass();
2074
return $this;
2175
}
76+
77+
/**
78+
* @return AggregationInterface
79+
*/
80+
public function getAggregations()
81+
{
82+
return $this->aggregations;
83+
}
84+
85+
/**
86+
* @param AggregationInterface $aggregations
87+
* @return $this
88+
*/
89+
public function setAggregations($aggregations)
90+
{
91+
$this->aggregations = $aggregations;
92+
return $this;
93+
}
94+
95+
/**
96+
* Get search criteria.
97+
*
98+
* @return \Magento\Framework\Api\SearchCriteriaInterface|null
99+
*/
100+
public function getSearchCriteria()
101+
{
102+
return null;
103+
}
104+
105+
/**
106+
* Set search criteria.
107+
*
108+
* @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria
109+
* @return $this
110+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
111+
*/
112+
public function setSearchCriteria(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria = null)
113+
{
114+
return $this;
115+
}
116+
117+
/**
118+
* Get total count.
119+
*
120+
* @return int
121+
*/
122+
public function getTotalCount()
123+
{
124+
return $this->getSize();
125+
}
126+
127+
/**
128+
* Set total count.
129+
*
130+
* @param int $totalCount
131+
* @return $this
132+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
133+
*/
134+
public function setTotalCount($totalCount)
135+
{
136+
return $this;
137+
}
138+
139+
/**
140+
* Set items list.
141+
*
142+
* @param \Magento\Framework\Api\ExtensibleDataInterface[] $items
143+
* @return $this
144+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
145+
*/
146+
public function setItems(array $items = null)
147+
{
148+
return $this;
149+
}
22150
}

0 commit comments

Comments
 (0)