Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/2.3-develop' into mtf-eol
Browse files Browse the repository at this point in the history
  • Loading branch information
tomreece committed Jun 11, 2019
2 parents 22decd2 + bb3cede commit 19018c4
Show file tree
Hide file tree
Showing 160 changed files with 1,674 additions and 1,028 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

?>
<?php
/**
* @see \Magento\AdminNotification\Block\Window
*/
Expand All @@ -19,11 +15,13 @@
"autoOpen": true,
"buttons": false,
"modalClass": "modal-system-messages",
"title": "<?= /* @escapeNotVerified */ $block->getHeaderText() ?>"
"title": "<?= $block->escapeHtmlAttr($block->getHeaderText()) ?>"
}
}'>
<li class="message message-warning warning">
<?= /* @escapeNotVerified */ $block->getNoticeMessageText() ?><br/>
<a href="<?= /* @escapeNotVerified */ $block->getNoticeMessageUrl() ?>"><?= /* @escapeNotVerified */ $block->getReadDetailsText() ?></a>
<?= $block->escapeHtml($block->getNoticeMessageText()) ?><br/>
<a href="<?= $block->escapeUrl($block->getNoticeMessageUrl()) ?>">
<?= $block->escapeHtml($block->getReadDetailsText()) ?>
</a>
</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,41 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/** @var $block \Magento\AdminNotification\Block\System\Messages */
?>
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages */ ?>

<?php $lastCritical = $block->getLastCritical();?>
<div id="system_messages" class="message-system<?php if ($lastCritical): ?> message-system-unread<?php endif; ?>">
<div id="system_messages"
class="message-system<?php if ($lastCritical) : ?>
message-system-unread<?php endif; ?>">
<div class="message-system-inner">
<?php if ($lastCritical): ?>
<?php if ($lastCritical) : ?>
<ul class="message-system-list">
<li class="message message-warning error">
<?= /* @escapeNotVerified */ $lastCritical->getText() ?>
<?= $block->escapeHtml($lastCritical->getText()) ?>
</li>
</ul>
<?php endif; ?>
<div class="message-system-short">
<span class="message-system-short-label">
<?= /* @escapeNotVerified */ __('System Messages:') ?>
<?= $block->escapeHtml(__('System Messages:')) ?>
</span>

<?php if ($block->getCriticalCount()): ?>
<?php if ($block->getCriticalCount()) : ?>
<div class="message message-warning error">
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Critical System Messages')) ?>">
<?= /* @escapeNotVerified */ $block->getCriticalCount() ?>
<?= (int) $block->getCriticalCount() ?>
</a>
</div>
<?php endif;?>
<?php endif; ?>

<?php if ($block->getMajorCount()): ?>
<?php if ($block->getMajorCount()) : ?>
<div class="message message-warning warning">
<a class="message-link" href="#" title="<?= $block->escapeHtml(__('Major System Messages')) ?>">
<?= /* @escapeNotVerified */ $block->getMajorCount() ?>
<?= (int) $block->getMajorCount() ?>
</a>
</div>
<?php endif;?>
<?php endif; ?>
</div>
<div id="message-system-all" title="<?= $block->escapeHtml(__('System messages')) ?>" data-mage-init='<?= $block->escapeHtml($block->getSystemMessageDialogJson()) ?>'></div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */
?>
<?php /** @var $block \Magento\AdminNotification\Block\System\Messages\UnreadMessagePopup */ ?>

<div style="display:none" id="system_messages_list" data-role="system_messages_list" title="<?= $block->escapeHtml($block->getPopupTitle()) ?>">
<div style="display:none" id="system_messages_list" data-role="system_messages_list"
title="<?= $block->escapeHtmlAttr($block->getPopupTitle()) ?>">
<ul class="message-system-list messages">
<?php foreach ($block->getUnreadMessages() as $message): ?>
<li class="message message-warning <?= /* @escapeNotVerified */ $block->getItemClass($message) ?>">
<?= /* @escapeNotVerified */ $message->getText() ?>
<?php foreach ($block->getUnreadMessages() as $message) : ?>
<li class="message message-warning <?= $block->escapeHtmlAttr($block->getItemClass($message)) ?>">
<?= $block->escapeHtml($message->getText()) ?>
</li>
<?php endforeach;?>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,78 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile
/** @var $this \Magento\AdminNotification\Block\ToolbarEntry */

?>
<?php /** @var $this \Magento\AdminNotification\Block\ToolbarEntry */ ?>
<?php
$notificationCount = $block->getUnreadNotificationCount();
$notificationCounterMax = $block->getNotificationCounterMax();
?>
<div
data-mage-init='{"toolbarEntry": {}}'
class="notifications-wrapper admin__action-dropdown-wrap"
data-notification-count="<?= /* @escapeNotVerified */ $notificationCount ?>">
data-notification-count="<?= (int)$notificationCount ?>">
<?php if ($notificationCount > 0) : ?>
<a
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
class="notifications-action admin__action-dropdown"
data-mage-init='{"dropdown":{}}'
title="<?= /* @escapeNotVerified */ __('Notifications') ?>"
title="<?= $block->escapeHtmlAttr(__('Notifications')) ?>"
data-toggle="dropdown">
<span class="notifications-counter">
<?= /* @escapeNotVerified */ ($notificationCount > $notificationCounterMax) ? $notificationCounterMax . '+' : $notificationCount ?>
<?= /* @noEscape */ ($notificationCount > $notificationCounterMax) ? (int)$notificationCounterMax . '+' : (int)$notificationCount ?>
</span>
</a>
<ul
class="admin__action-dropdown-menu"
data-mark-as-read-url="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/ajaxMarkAsRead') ?>">
data-mark-as-read-url="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/ajaxMarkAsRead')) ?>">
<?php foreach ($block->getLatestUnreadNotifications() as $notification) : ?>
<?php /** @var $notification \Magento\AdminNotification\Model\Inbox*/ ?>
<li class="notifications-entry<?php if ($notification->getSeverity() == 1): ?> notifications-critical<?php endif; ?>"
data-notification-id="<?= /* @escapeNotVerified */ $notification->getId() ?>"
data-notification-severity="<?php if ($notification->getSeverity() == 1): ?>1<?php endif; ?>">
<?php
$notificationDescription = $block->escapeHtml($notification->getDescription());
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
?>
<strong class="notifications-entry-title">
<?= $block->escapeHtml($notification->getTitle()) ?>
</strong>
<?php if (strlen($notificationDescription) > $notificationDescriptionLength) : ?>
<p class="notifications-entry-description _cutted">
<span class="notifications-entry-description-start">
<?= /* @escapeNotVerified */ substr($notificationDescription, 0, $notificationDescriptionLength) ?>
</span>
<span class="notifications-entry-description-end">
<?= /* @escapeNotVerified */ substr($notificationDescription, $notificationDescriptionLength) ?>
</span>
</p>
<?php else : ?>
<p class="notifications-entry-description">
<?= /* @escapeNotVerified */ $notificationDescription ?>
</p>
<?php endif; ?>
<time class="notifications-entry-time">
<?= /* @escapeNotVerified */ $block->formatNotificationDate($notification->getDateAdded()) ?>
</time>
<button
type="button"
class="notifications-close"
title="<?= /* @escapeNotVerified */ __('Close') ?>"
></button>
</li>
<?php /** @var $notification \Magento\AdminNotification\Model\Inbox */ ?>
<li class="notifications-entry<?php if ($notification->getSeverity() == 1) : ?> notifications-critical<?php endif; ?>"
data-notification-id="<?= $block->escapeHtmlAttr($notification->getId()) ?>"
data-notification-severity="<?php if ($notification->getSeverity() == 1) : ?>1<?php endif; ?>">
<?php
$notificationDescription = $notification->getDescription();
$notificationDescriptionLength = $block->getNotificationDescriptionLength();
?>
<strong class="notifications-entry-title">
<?= $block->escapeHtml($notification->getTitle()) ?>
</strong>
<?php if (strlen($notificationDescription) > $notificationDescriptionLength) : ?>
<p class="notifications-entry-description _cutted">
<span class="notifications-entry-description-start">
<?= $block->escapeHtml(substr($notificationDescription, 0, $notificationDescriptionLength)) ?>
</span>
<span class="notifications-entry-description-end">
<?= $block->escapeHtml(substr($notificationDescription, $notificationDescriptionLength)) ?>
</span>
</p>
<?php else : ?>
<p class="notifications-entry-description">
<?= $block->escapeHtml($notificationDescription) ?>
</p>
<?php endif; ?>
<time class="notifications-entry-time">
<?= $block->escapeHtml($block->formatNotificationDate($notification->getDateAdded())) ?>
</time>
<button
type="button"
class="notifications-close"
title="<?= $block->escapeHtmlAttr(__('Close')) ?>"
></button>
</li>
<?php endforeach; ?>
<li class="notifications-entry notifications-entry-last">
<a
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
class="action-tertiary action-more">
<?= /* @escapeNotVerified */ __('See All (') ?><span class="notifications-counter"><?= /* @escapeNotVerified */ $notificationCount ?></span><?= /* @escapeNotVerified */ __(' unread)') ?>
<?= $block->escapeHtml(__('See All (')) ?><span class="notifications-counter"><?= (int)$notificationCount ?></span><?= $block->escapeHtml(__(' unread)')) ?>
</a>
</li>
</ul>
<?php else : ?>
<a
class="notifications-action admin__action-dropdown"
href="<?= /* @escapeNotVerified */ $block->getUrl('adminhtml/notification/index') ?>"
title="<?= /* @escapeNotVerified */ __('Notifications') ?>">
href="<?= $block->escapeUrl($block->getUrl('adminhtml/notification/index')) ?>"
title="<?= $block->escapeHtmlAttr(__('Notifications')) ?>">
</a>
<?php endif; ?>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
namespace Magento\Analytics\Model\ReportXml;

use Magento\Framework\Module\Manager as ModuleManager;
use \Magento\Framework\Module\ModuleManagerInterface as ModuleManager;

/**
* Iterator for ReportXml modules
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
namespace Magento\Analytics\Test\Unit\Model\ReportXml;

use Magento\Analytics\Model\ReportXml\ModuleIterator;
use Magento\Framework\Module\Manager as ModuleManager;
use \Magento\Framework\Module\ModuleManagerInterface as ModuleManager;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;

/**
* Module iterator test.
*/
class ModuleIteratorTest extends \PHPUnit\Framework\TestCase
{
/**
Expand Down
18 changes: 13 additions & 5 deletions app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ class Grid extends \Magento\Backend\Block\Dashboard\Grid
protected $_collectionFactory;

/**
* @var \Magento\Framework\Module\Manager
* @var \Magento\Framework\Module\ModuleManagerInterface
*/
protected $_moduleManager;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Backend\Helper\Data $backendHelper
* @param \Magento\Framework\Module\Manager $moduleManager
* @param \Magento\Framework\Module\ModuleManagerInterface $moduleManager
* @param \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Backend\Helper\Data $backendHelper,
\Magento\Framework\Module\Manager $moduleManager,
\Magento\Framework\Module\ModuleManagerInterface $moduleManager,
\Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory,
array $data = []
) {
Expand All @@ -43,6 +43,8 @@ public function __construct(
}

/**
* Construct.
*
* @return void
*/
protected function _construct()
Expand All @@ -52,6 +54,8 @@ protected function _construct()
}

/**
* Prepare collection.
*
* @return $this
*/
protected function _prepareCollection()
Expand Down Expand Up @@ -110,6 +114,8 @@ protected function _preparePage()
}

/**
* Prepare columns.
*
* @return $this
*/
protected function _prepareColumns()
Expand All @@ -129,7 +135,9 @@ protected function _prepareColumns()
]
);

$baseCurrencyCode = $this->_storeManager->getStore((int)$this->getParam('store'))->getBaseCurrencyCode();
$baseCurrencyCode = $this->_storeManager->getStore(
(int)$this->getParam('store')
)->getBaseCurrencyCode();

$this->addColumn(
'total',
Expand All @@ -149,7 +157,7 @@ protected function _prepareColumns()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getRowUrl($row)
{
Expand Down
8 changes: 5 additions & 3 deletions app/code/Magento/Backend/Block/Dashboard/Sales.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,29 @@ class Sales extends \Magento\Backend\Block\Dashboard\Bar
protected $_template = 'Magento_Backend::dashboard/salebar.phtml';

/**
* @var \Magento\Framework\Module\Manager
* @var \Magento\Framework\Module\ModuleManagerInterface
*/
protected $_moduleManager;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory
* @param \Magento\Framework\Module\Manager $moduleManager
* @param \Magento\Framework\Module\ModuleManagerInterface $moduleManager
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Reports\Model\ResourceModel\Order\CollectionFactory $collectionFactory,
\Magento\Framework\Module\Manager $moduleManager,
\Magento\Framework\Module\ModuleManagerInterface $moduleManager,
array $data = []
) {
$this->_moduleManager = $moduleManager;
parent::__construct($context, $collectionFactory, $data);
}

/**
* Prepare layout.
*
* @return $this|void
*/
protected function _prepareLayout()
Expand Down
Loading

0 comments on commit 19018c4

Please sign in to comment.