Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into 2.3-develop-pr21
Browse files Browse the repository at this point in the history
  • Loading branch information
zakdma committed Jun 6, 2018
2 parents e6e0868 + c62d922 commit 0687df0
Show file tree
Hide file tree
Showing 38 changed files with 107 additions and 60 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Adminhtml/Category/Tree.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public function getBreadcrumbsJavascript($path, $javascriptVarName)
*
* @param Node|array $node
* @param int $level
* @return string
* @return array
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function (node, e) {
*
* @param \Magento\Framework\Data\Tree\Node|array $node
* @param int $level
* @return string
* @return array
*/
protected function _getNodeJson($node, $level = 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme
/**
* Retrieve data object related with form
*
* @return \Magento\Catalog\Model\Product || \Magento\Catalog\Model\Category
* @return \Magento\Catalog\Model\Product|\Magento\Catalog\Model\Category
*/
public function getDataObject()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ protected function _prepareColumns()
'type' => 'options',
'options' => ['1' => __('Yes'), '0' => __('No')],
'align' => 'center'
],
'is_user_defined'
]
);

$this->_eventManager->dispatch('product_attribute_grid_build', ['grid' => $this]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function getSelectorOptions()
*
* @param string $labelPart
* @param int $templateId
* @return \Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection
* @return array
*/
public function getSuggestedAttributes($labelPart, $templateId = null)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Adminhtml/Rss/Grid/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function isRssAllowed()
}

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Category/Rss/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getLabel()
}

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Product/AbstractProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function getAddToCompareUrl()
* Gets minimal sales quantity
*
* @param \Magento\Catalog\Model\Product $product
* @return int|null
* @return float|null
*/
public function getMinimalQty($product)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public function getPrice($price, $includingTax = null)
* Returns price converted to current currency rate
*
* @param float $price
* @return float
* @return float|string
*/
public function getCurrencyPrice($price)
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Block/Rss/Product/Special.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function _construct()
}

/**
* @return string
* @return array
*/
public function getRssData()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ define([
_bindSubmit: function () {
var self = this;

if (this.element.data('catalog-addtocart-initialized')) {
return;
}

this.element.data('catalog-addtocart-initialized', 1);
this.element.on('submit', function (e) {
e.preventDefault();
self.submitForm($(this));
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Config/Model/Config/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function import(array $data)
$this->scopeConfig->clean();
}

$this->state->emulateAreaCode(Area::AREA_ADMINHTML, function () use ($changedData, $data) {
$this->state->emulateAreaCode(Area::AREA_ADMINHTML, function () use ($changedData) {
$this->scope->setCurrentScope(Area::AREA_ADMINHTML);

// Invoke saving of new values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function testGetElementHtmlWithValue()
'showInWebsite' => '1',
'showInStore' => '1',
'label' => null,
'backend_model' => \Magento\BackendModelConfig\Backend\Image::class,
'backend_model' => \Magento\Config\Model\Config\Backend\Image::class,
'upload_dir' => [
'config' => 'system/filesystem/media',
'scope_info' => '1',
Expand Down
10 changes: 10 additions & 0 deletions app/code/Magento/Multishipping/Block/Checkout/Overview.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,19 @@ public function getQuote()
}

/**
* @deprecated
* typo in method name, see getBillingAddressTotals()
* @return mixed
*/
public function getBillinAddressTotals()
{
return $this->getBillingAddressTotals();
}

/**
* @return mixed
*/
public function getBillingAddressTotals()
{
$address = $this->getQuote()->getBillingAddress();
return $this->getShippingAddressTotals($address);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Multishipping/Block/Checkout/Shipping.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Magento\Quote\Model\Quote\Address;

/**
* Multishipping checkout shipping
* Mustishipping checkout shipping
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
<?php endforeach; ?>
</tbody>
<tfoot>
<?= /* @noEscape */ $block->renderTotals($block->getBillinAddressTotals()); ?>
<?= /* @noEscape */ $block->renderTotals($block->getBillingAddressTotals()); ?>
</tfoot>
</table>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function canDisplay()
}

/**
* Retrieve disply item qty availability
* Retrieve display item qty availability
*
* @return false
*/
Expand Down
10 changes: 9 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
namespace Magento\Ui\Model\Export;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -16,7 +18,7 @@
class ConvertToCsv
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand All @@ -30,11 +32,17 @@ class ConvertToCsv
*/
protected $pageSize = null;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param int $pageSize
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down
12 changes: 11 additions & 1 deletion app/code/Magento/Ui/Model/Export/ConvertToXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Convert\Excel;
use Magento\Framework\Convert\ExcelFactory;
use Magento\Framework\Exception\FileSystemException;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -20,7 +22,7 @@
class ConvertToXml
{
/**
* @var DirectoryList
* @var WriteInterface
*/
protected $directory;

Expand Down Expand Up @@ -49,12 +51,18 @@ class ConvertToXml
*/
protected $fields;

/**
* @var Filter
*/
protected $filter;

/**
* @param Filesystem $filesystem
* @param Filter $filter
* @param MetadataProvider $metadataProvider
* @param ExcelFactory $excelFactory
* @param SearchResultIteratorFactory $iteratorFactory
* @throws FileSystemException
*/
public function __construct(
Filesystem $filesystem,
Expand Down Expand Up @@ -87,6 +95,7 @@ protected function getOptions()
* Returns DB fields list
*
* @return array
* @throws LocalizedException
*/
protected function getFields()
{
Expand All @@ -102,6 +111,7 @@ protected function getFields()
*
* @param DocumentInterface $document
* @return array
* @throws LocalizedException
*/
public function getRowData(DocumentInterface $document)
{
Expand Down
18 changes: 8 additions & 10 deletions app/code/Magento/Ui/view/base/templates/control/button/split.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</button>
<?php if ($block->hasSplit()): ?>
<button <?= $block->getToggleAttributesHtml() ?>>
<span>Select</span>
<span><?= /* @escapeNotVerified */ __('Select'); ?></span>
</button>

<?php if (!$block->getDisabled()): ?>
Expand All @@ -40,12 +40,10 @@
<?php endif; ?>
<?php endif; ?>
</div>

<script>
require(['jquery'], function($){
$('.actions-split')
.on('click.splitDefault', '.action-default', function() {
$(this).siblings('.dropdown-menu').find('.item-default').trigger('click');
});
});
</script>
<script type="text/x-magento-init">
{
".actions-split": {
"Magento_Ui/js/grid/controls/button/split": {}
}
}
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ define([
* @returns {Group} Chainable.
*/
_setClasses: function () {
var addtional = this.additionalClasses,
var additional = this.additionalClasses,
classes;

if (_.isString(addtional)) {
addtional = this.additionalClasses.split(' ');
if (_.isString(additional)) {
additional = this.additionalClasses.split(' ');
classes = this.additionalClasses = {};

addtional.forEach(function (name) {
additional.forEach(function (name) {
classes[name] = true;
}, this);
}
Expand Down
8 changes: 4 additions & 4 deletions app/code/Magento/Ui/view/base/web/js/form/components/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ define([
* @returns {Group} Chainable.
*/
_setClasses: function () {
var addtional = this.additionalClasses,
var additional = this.additionalClasses,
classes;

if (_.isString(addtional)) {
addtional = this.additionalClasses.split(' ');
if (_.isString(additional)) {
additional = this.additionalClasses.split(' ');
classes = this.additionalClasses = {};

addtional.forEach(function (name) {
additional.forEach(function (name) {
classes[name] = true;
}, this);
}
Expand Down
17 changes: 17 additions & 0 deletions app/code/Magento/Ui/view/base/web/js/grid/controls/button/split.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

define([
'jquery'
], function ($) {
'use strict';

return function (data, element) {

$(element).on('click.splitDefault', '.action-default', function () {
$(this).siblings('.dropdown-menu').find('.item-default').trigger('click');
});
};
});
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function getAdminPasswordLifetime()
}

/**
* Get admin maximum security failures from config
* Get admin maxiumum security failures from config
*
* @return int
*/
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Wishlist/Block/Rss/EmailLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class EmailLink extends Link
protected $_template = 'rss/email.phtml';

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Wishlist/Block/Rss/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function isRssAllowed()
}

/**
* @return string
* @return array
*/
protected function getLinkParams()
{
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Wishlist/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ public function isAllowInCart()
/**
* Retrieve customer name
*
* @return string|void
* @return string|null
*/
public function getCustomerName()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function __construct(Data $helper)
/**
* Add tax data to result
*
* @param \Magento\Checkout\CustomerData\Cart $subject
* @param \Magento\Catalog\Ui\DataProvider\Product\Listing\DataProvider $subject
* @param array $result
* @return array
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
Expand Down
Loading

0 comments on commit 0687df0

Please sign in to comment.