@@ -38,8 +38,10 @@ To suggest documentation improvements, click [here][4].
| ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. |
| ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. |
| ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. |
-| ![acknowledged](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
-| ![acknowledged](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
+| ![in progress](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. |
+| ![needs update](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. |
+
+To learn more about issue gate labels click [here](https://github.com/magento/magento2/wiki/Magento-Issue-Gates)
Reporting security issues
diff --git a/app/bootstrap.php b/app/bootstrap.php
index 3d474cea45432..e77c6d432c816 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -14,12 +14,12 @@
if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) {
if (PHP_SAPI == 'cli') {
echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' .
- 'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html';
+ 'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html';
} else {
echo <<
Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read
-
+
Magento System Requirements .
HTML;
diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json
index a3371c702c729..59a3845cbd4b7 100644
--- a/app/code/Magento/AdminNotification/composer.json
+++ b/app/code/Magento/AdminNotification/composer.json
@@ -11,7 +11,7 @@
"lib-libxml": "*"
},
"type": "magento2-module",
- "version": "100.2.0",
+ "version": "100.2.1",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
index 23829d3725119..0e8acb37104e6 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php
@@ -394,7 +394,7 @@ protected function saveAndReplaceAdvancedPrices()
? $rowData[self::COL_TIER_PRICE] : 0,
'percentage_value' => $rowData[self::COL_TIER_PRICE_TYPE] === self::TIER_PRICE_TYPE_PERCENT
? $rowData[self::COL_TIER_PRICE] : null,
- 'website_id' => $this->getWebsiteId($rowData[self::COL_TIER_PRICE_WEBSITE])
+ 'website_id' => $this->getWebSiteId($rowData[self::COL_TIER_PRICE_WEBSITE])
];
}
}
diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
index 5111b4932d7a8..9a380ff75da24 100644
--- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
+++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php
@@ -27,7 +27,7 @@ class WebsiteTest extends \PHPUnit\Framework\TestCase
protected function setUp()
{
- $this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\WebSite::class)
+ $this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\Website::class)
->setMethods(['getBaseCurrency'])
->disableOriginalConstructor()
->getMock();
diff --git a/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php b/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php
index c4118792255cd..34f2b7d53d9be 100644
--- a/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php
+++ b/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php
@@ -5,13 +5,35 @@
*/
namespace Magento\Analytics\Block\Adminhtml\System\Config;
+use Magento\Framework\App\ObjectManager;
+
/**
* Provides label with default Time Zone
*/
class CollectionTimeLabel extends \Magento\Config\Block\System\Config\Form\Field
{
/**
- * Add default time zone to comment
+ * @var \Magento\Framework\Locale\ResolverInterface
+ */
+ private $localeResolver;
+
+ /**
+ * @param \Magento\Backend\Block\Template\Context $context
+ * @param array $data
+ * @param \Magento\Framework\Locale\ResolverInterface|null $localeResolver
+ */
+ public function __construct(
+ \Magento\Backend\Block\Template\Context $context,
+ array $data = [],
+ \Magento\Framework\Locale\ResolverInterface $localeResolver = null
+ ) {
+ $this->localeResolver = $localeResolver ?:
+ ObjectManager::getInstance()->get(\Magento\Framework\Locale\ResolverInterface::class);
+ parent::__construct($context, $data);
+ }
+
+ /**
+ * Add current time zone to comment, properly translated according to locale
*
* @param \Magento\Framework\Data\Form\Element\AbstractElement $element
* @return string
@@ -19,7 +41,9 @@ class CollectionTimeLabel extends \Magento\Config\Block\System\Config\Form\Field
public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element)
{
$timeZoneCode = $this->_localeDate->getConfigTimezone();
- $getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode)->getDisplayName();
+ $locale = $this->localeResolver->getLocale();
+ $getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode)
+ ->getDisplayName(false, \IntlTimeZone::DISPLAY_LONG, $locale);
$element->setData(
'comment',
sprintf("%s (%s)", $getLongTimeZoneName, $timeZoneCode)
diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json
index b17bb10cb4112..349e5f3c08c4c 100644
--- a/app/code/Magento/Analytics/composer.json
+++ b/app/code/Magento/Analytics/composer.json
@@ -4,10 +4,10 @@
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/module-backend": "100.2.*",
- "magento/module-config": "100.2.*",
+ "magento/module-config": "101.0.*",
"magento/module-integration": "100.2.*",
"magento/module-store": "100.2.*",
- "magento/framework": "100.2.*"
+ "magento/framework": "101.0.*"
},
"type": "magento2-module",
"version": "100.2.0",
diff --git a/app/code/Magento/Analytics/etc/di.xml b/app/code/Magento/Analytics/etc/di.xml
index 56657b58475d3..b9bb9cc9ff00c 100644
--- a/app/code/Magento/Analytics/etc/di.xml
+++ b/app/code/Magento/Analytics/etc/di.xml
@@ -254,4 +254,22 @@
NotifyDataChangedResponseResolver
+
+
+
+ - 1
+ - 1
+ - 1
+ - 1
+ - 1
+ - 1
+ - 1
+
+
+ - 1
+ - 1
+ - 1
+
+
+
diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
index 9d9409fba093b..50279786c0a5b 100644
--- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
+++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php
@@ -92,7 +92,7 @@ protected function _prepareCollection()
protected function _afterLoadCollection()
{
foreach ($this->getCollection() as $item) {
- $item->getCustomer() ?: $item->setCustomer('Guest');
+ $item->getCustomer() ?: $item->setCustomer($item->getBillingAddress()->getName());
}
return $this;
}
diff --git a/app/code/Magento/Backend/Block/GlobalSearch.php b/app/code/Magento/Backend/Block/GlobalSearch.php
index f4a46283808f4..9af4e9faef761 100644
--- a/app/code/Magento/Backend/Block/GlobalSearch.php
+++ b/app/code/Magento/Backend/Block/GlobalSearch.php
@@ -3,19 +3,61 @@
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
+
namespace Magento\Backend\Block;
+use Magento\Backend\Model\GlobalSearch\SearchEntityFactory;
+use Magento\Backend\Model\GlobalSearch\SearchEntity;
+use Magento\Framework\App\ObjectManager;
+
/**
* @api
* @since 100.0.2
*/
class GlobalSearch extends \Magento\Backend\Block\Template
{
+ /**
+ * @var SearchEntityFactory
+ */
+ private $searchEntityFactory;
+
/**
* @var string
*/
protected $_template = 'Magento_Backend::system/search.phtml';
+ /**
+ * @var array
+ */
+ private $entityResources;
+
+ /**
+ * @var array
+ */
+ private $entityPaths;
+
+ /**
+ * @param Template\Context $context
+ * @param array $data
+ * @param array $entityResources
+ * @param array $entityPaths
+ * @param SearchEntityFactory|null $searchEntityFactory
+ */
+ public function __construct(
+ Template\Context $context,
+ array $data = [],
+ array $entityResources = [],
+ array $entityPaths = [],
+ SearchEntityFactory $searchEntityFactory = null
+ ) {
+ $this->entityResources = $entityResources;
+ $this->entityPaths = $entityPaths;
+ $this->searchEntityFactory = $searchEntityFactory ?: ObjectManager::getInstance()
+ ->get(SearchEntityFactory::class);
+
+ parent::__construct($context, $data);
+ }
+
/**
* Get components configuration
* @return array
@@ -34,4 +76,48 @@ public function getWidgetInitOptions()
]
];
}
+
+ /**
+ * Get entities which are allowed to show.
+ *
+ * @return SearchEntity[]
+ */
+ public function getEntitiesToShow()
+ {
+ $allowedEntityTypes = [];
+ $entitiesToShow = [];
+
+ foreach ($this->entityResources as $entityType => $resource) {
+ if ($this->getAuthorization()->isAllowed($resource)) {
+ $allowedEntityTypes[] = $entityType;
+ }
+ }
+
+ foreach ($allowedEntityTypes as $entityType) {
+ $url = $this->getUrlEntityType($entityType);
+
+ $searchEntity = $this->searchEntityFactory->create();
+ $searchEntity->setId('searchPreview' . $entityType);
+ $searchEntity->setTitle('in ' . $entityType);
+ $searchEntity->setUrl($url);
+
+ $entitiesToShow[] = $searchEntity;
+ }
+
+ return $entitiesToShow;
+ }
+
+ /**
+ * Get url path by entity type.
+ *
+ * @param string $entityType
+ *
+ * @return string
+ */
+ private function getUrlEntityType(string $entityType)
+ {
+ $urlPath = $this->entityPaths[$entityType] ?? '';
+
+ return $this->getUrl($urlPath);
+ }
}
diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
index f19799d2e4939..034887c67d1ee 100644
--- a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
+++ b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php
@@ -37,7 +37,7 @@ protected function _prepareForm()
['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]
);
- $this->_prepareStoreFieldSet($form);
+ $this->_prepareStoreFieldset($form);
$form->addField(
'store_type',
diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
index c9bce1cbf3888..421885a0c32a3 100644
--- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
+++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php
@@ -54,9 +54,9 @@ public function execute()
$user = $this->_objectManager->create(\Magento\User\Model\User::class)->load($userId);
$user->setId($userId)
- ->setUsername($this->getRequest()->getParam('username', false))
- ->setFirstname($this->getRequest()->getParam('firstname', false))
- ->setLastname($this->getRequest()->getParam('lastname', false))
+ ->setUserName($this->getRequest()->getParam('username', false))
+ ->setFirstName($this->getRequest()->getParam('firstname', false))
+ ->setLastName($this->getRequest()->getParam('lastname', false))
->setEmail(strtolower($this->getRequest()->getParam('email', false)));
if ($this->_objectManager->get(\Magento\Framework\Validator\Locale::class)->isValid($interfaceLocale)) {
diff --git a/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php b/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php
new file mode 100644
index 0000000000000..18691802b9218
--- /dev/null
+++ b/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php
@@ -0,0 +1,73 @@
+getData('id');
+ }
+
+ /**
+ * Get url.
+ *
+ * @return string
+ */
+ public function getUrl()
+ {
+ return $this->getData('url');
+ }
+
+ /**
+ * Get title.
+ *
+ * @return string
+ */
+ public function getTitle()
+ {
+ return $this->getData('title');
+ }
+
+ /**
+ * Set Id.
+ *
+ * @param string $value
+ */
+ public function setId(string $value)
+ {
+ $this->setData('id', $value);
+ }
+
+ /**
+ * Set url.
+ *
+ * @param string $value
+ */
+ public function setUrl(string $value)
+ {
+ $this->setData('url', $value);
+ }
+
+ /**
+ * Set title.
+ *
+ * @param string $value
+ */
+ public function setTitle(string $value)
+ {
+ $this->setData('title', $value);
+ }
+}
diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php
index fe6564d24e891..42febe94d0abf 100644
--- a/app/code/Magento/Backend/Model/Menu/Item.php
+++ b/app/code/Magento/Backend/Model/Menu/Item.php
@@ -467,15 +467,15 @@ public function toArray()
{
return [
'parent_id' => $this->_parentId,
- 'module_name' => $this->_moduleName,
+ 'module' => $this->_moduleName,
'sort_index' => $this->_sortIndex,
- 'depends_on_config' => $this->_dependsOnConfig,
+ 'dependsOnConfig' => $this->_dependsOnConfig,
'id' => $this->_id,
'resource' => $this->_resource,
'path' => $this->_path,
'action' => $this->_action,
- 'depends_on_module' => $this->_dependsOnModule,
- 'tooltip' => $this->_tooltip,
+ 'dependsOnModule' => $this->_dependsOnModule,
+ 'toolTip' => $this->_tooltip,
'title' => $this->_title,
'target' => $this->target,
'sub_menu' => isset($this->_submenu) ? $this->_submenu->toArray() : null
@@ -492,15 +492,15 @@ public function toArray()
public function populateFromArray(array $data)
{
$this->_parentId = $this->_getArgument($data, 'parent_id');
- $this->_moduleName = $this->_getArgument($data, 'module_name', 'Magento_Backend');
+ $this->_moduleName = $this->_getArgument($data, 'module', 'Magento_Backend');
$this->_sortIndex = $this->_getArgument($data, 'sort_index');
- $this->_dependsOnConfig = $this->_getArgument($data, 'depends_on_config');
+ $this->_dependsOnConfig = $this->_getArgument($data, 'dependsOnConfig');
$this->_id = $this->_getArgument($data, 'id');
$this->_resource = $this->_getArgument($data, 'resource');
$this->_path = $this->_getArgument($data, 'path', '');
$this->_action = $this->_getArgument($data, 'action');
- $this->_dependsOnModule = $this->_getArgument($data, 'depends_on_module');
- $this->_tooltip = $this->_getArgument($data, 'tooltip', '');
+ $this->_dependsOnModule = $this->_getArgument($data, 'dependsOnModule');
+ $this->_tooltip = $this->_getArgument($data, 'toolTip');
$this->_title = $this->_getArgument($data, 'title');
$this->target = $this->_getArgument($data, 'target');
if (isset($data['sub_menu'])) {
diff --git a/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php
new file mode 100644
index 0000000000000..0010ffad87524
--- /dev/null
+++ b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php
@@ -0,0 +1,123 @@
+ \Magento\Catalog\Controller\Adminhtml\Product::ADMIN_RESOURCE,
+ 'Orders' => \Magento\Sales\Controller\Adminhtml\Order::ADMIN_RESOURCE,
+ 'Customers' => \Magento\Customer\Controller\Adminhtml\Index::ADMIN_RESOURCE,
+ 'Pages' => \Magento\Cms\Controller\Adminhtml\Page\Index::ADMIN_RESOURCE,
+ ];
+
+ /**
+ * @var array
+ */
+ private $entityPaths = [
+ 'Products' => 'catalog/product/index/',
+ 'Orders' => 'sales/order/index/',
+ 'Customers' => 'customer/index/index',
+ 'Pages' => 'cms/page/index/',
+ ];
+
+ protected function setUp()
+ {
+ $objectManager = new ObjectManager($this);
+
+ $this->authorization = $this->createMock(\Magento\Framework\AuthorizationInterface::class);
+ $this->urlBuilder = $this->createMock(\Magento\Framework\UrlInterface::class);
+ $context = $this->createMock(\Magento\Backend\Block\Template\Context::class);
+
+ $context->expects($this->atLeastOnce())->method('getAuthorization')->willReturn($this->authorization);
+ $context->expects($this->atLeastOnce())->method('getUrlBuilder')->willReturn($this->urlBuilder);
+
+ $this->searchEntityFactory = $this->createMock(\Magento\Backend\Model\GlobalSearch\SearchEntityFactory::class);
+
+ $this->globalSearch = $objectManager->getObject(
+ GlobalSearch::class,
+ [
+ 'context' => $context,
+ 'searchEntityFactory' => $this->searchEntityFactory,
+ 'entityResources' => $this->entityResources,
+ 'entityPaths' => $this->entityPaths,
+ ]
+ );
+ }
+
+ /**
+ * @param array $results
+ * @param int $expectedEntitiesQty
+ *
+ * @dataProvider getEntitiesToShowDataProvider
+ */
+ public function testGetEntitiesToShow(array $results, int $expectedEntitiesQty)
+ {
+ $searchEntity = $this->createMock(SearchEntity::class);
+
+ $this->authorization->expects($this->exactly(count($results)))->method('isAllowed')
+ ->willReturnOnConsecutiveCalls($results[0], $results[1], $results[2], $results[3]);
+ $this->urlBuilder->expects($this->exactly($expectedEntitiesQty))
+ ->method('getUrl')->willReturn('some/url/is/here');
+ $this->searchEntityFactory->expects($this->exactly($expectedEntitiesQty))
+ ->method('create')->willReturn($searchEntity);
+
+ $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setId');
+ $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setTitle');
+ $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setUrl');
+
+ $this->assertSame($expectedEntitiesQty, count($this->globalSearch->getEntitiesToShow()));
+ }
+
+ public function getEntitiesToShowDataProvider()
+ {
+ return [
+ [
+ [true, false, true, false],
+ 2,
+ ],
+ [
+ [true, true, true, true],
+ 4,
+ ],
+ [
+ [false, false, false, false],
+ 0,
+ ],
+ ];
+ }
+}
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php
index be171a8ed40bf..df242a4cf6129 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php
@@ -117,7 +117,7 @@ public function testSetFilterTypePropagatesFilterTypeToColumns()
public function testGetRowUrlIfUrlPathNotSet()
{
- $this->assertEquals('#', $this->_block->getRowUrl(new \StdClass()));
+ $this->assertEquals('#', $this->_block->getRowUrl(new \stdClass()));
}
public function testGetRowUrl()
diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
index da13af87b71ea..c5c56fd75fbe7 100644
--- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php
@@ -351,7 +351,7 @@ public function testSetGetGrid()
$this->_block->setFilter('StdClass');
- $grid = new \StdClass();
+ $grid = new \stdClass();
$this->_block->setGrid($grid);
$this->assertEquals($grid, $this->_block->getGrid());
}
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
index 31a13191750a3..2f0102ffd410d 100755
--- a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php
@@ -20,7 +20,8 @@ public function testBeforeSave($value, $errorMessage = null)
\Magento\Backend\Model\Config\SessionLifetime\BackendModel::class
);
if ($errorMessage !== null) {
- $this->expectException(\Magento\Framework\Exception\LocalizedException::class, $errorMessage);
+ $this->expectException(\Magento\Framework\Exception\LocalizedException::class);
+ $this->expectExceptionMessage($errorMessage);
}
$model->setValue($value);
$object = $model->beforeSave();
diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php
index 74368537c39c7..ad172cbfbd165 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php
@@ -56,9 +56,9 @@ class ItemTest extends \PHPUnit\Framework\TestCase
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
];
protected function setUp()
diff --git a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php
index b0c74461980a2..82f07e264b963 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php
@@ -12,21 +12,21 @@
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
[
'parent_id' => null,
- 'module_name' => 'Magento_Backend',
+ 'module' => 'Magento_Backend',
'sort_index' => null,
- 'depends_on_config' => 'system/config/isEnabled',
+ 'dependsOnConfig' => 'system/config/isEnabled',
'id' => 'item',
'resource' => 'Magento_Config::config',
'path' => '',
'action' => '/system/config',
- 'depends_on_module' => 'Magento_Backend',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'toolTip' => 'Item tooltip',
'title' => 'Item Title',
'sub_menu' => null,
'target' => null
@@ -38,43 +38,43 @@
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => '5',
'resource' => null,
'path' => null,
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => null,
+ 'dependsOnModule' => null,
+ 'toolTip' => null,
'title' => null,
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => '5',
'resource' => null,
'path' => '',
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => '',
+ 'dependsOnModule' => null,
+ 'toolTip' => '',
'title' => null,
'sub_menu' => ['submenuArray'],
'target' => null
@@ -83,51 +83,51 @@
'data with submenu to constructor' => [
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => '5',
'resource' => null,
'path' => null,
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => null,
+ 'dependsOnModule' => null,
+ 'toolTip' => null,
'title' => null,
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => null,
'resource' => null,
'path' => '',
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => '',
+ 'dependsOnModule' => null,
+ 'toolTip' => '',
'title' => null,
'sub_menu' => ['submenuArray'],
'target' => null
diff --git a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php
index 30a43b0158ae3..b1a310d7d440b 100644
--- a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php
+++ b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php
@@ -11,22 +11,22 @@
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
'sub_menu' => null,
],
[
'parent_id' => null,
- 'module_name' => 'Magento_Backend',
+ 'module' => 'Magento_Backend',
'sort_index' => null,
- 'depends_on_config' => 'system/config/isEnabled',
+ 'dependsOnConfig' => 'system/config/isEnabled',
'id' => 'item',
'resource' => 'Magento_Config::config',
'path' => '',
'action' => '/system/config',
- 'depends_on_module' => 'Magento_Backend',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'toolTip' => 'Item tooltip',
'title' => 'Item Title',
'sub_menu' => null,
'target' => null
@@ -35,46 +35,46 @@
'with submenu' => [
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => '5',
'resource' => null,
'path' => null,
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => null,
+ 'dependsOnModule' => null,
+ 'toolTip' => null,
'title' => null,
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => '5',
'resource' => null,
'path' => null,
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => '',
+ 'dependsOnModule' => null,
+ 'toolTip' => '',
'title' => null,
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
'target' => null
]
@@ -82,38 +82,38 @@
'small set of data' => [
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
],
[
'parent_id' => '1',
- 'module_name' => 'Magento_Module1',
+ 'module' => 'Magento_Module1',
'sort_index' => '50',
- 'depends_on_config' => null,
+ 'dependsOnConfig' => null,
'id' => null,
'resource' => null,
'path' => '',
'action' => null,
- 'depends_on_module' => null,
- 'tooltip' => '',
+ 'dependsOnModule' => null,
+ 'toolTip' => '',
'title' => null,
'sub_menu' => [
'id' => 'item',
'title' => 'Item Title',
'action' => '/system/config',
'resource' => 'Magento_Config::config',
- 'depends_on_module' => 'Magento_Backend',
- 'depends_on_config' => 'system/config/isEnabled',
- 'tooltip' => 'Item tooltip',
+ 'dependsOnModule' => 'Magento_Backend',
+ 'dependsOnConfig' => 'system/config/isEnabled',
+ 'toolTip' => 'Item tooltip',
],
'target' => null
]
diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json
index 3d8cfa49cd1fa..d2cc8f76393f9 100644
--- a/app/code/Magento/Backend/composer.json
+++ b/app/code/Magento/Backend/composer.json
@@ -24,7 +24,7 @@
"magento/module-theme": "100.2.*"
},
"type": "magento2-module",
- "version": "100.2.1",
+ "version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml
index 97a39139411c0..de8286e7f3ecc 100644
--- a/app/code/Magento/Backend/etc/adminhtml/di.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/di.xml
@@ -145,6 +145,9 @@
- Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN
- Magento\Config\Model\Config\Structure\ElementVisibilityInterface::DISABLED
+
+
+
@@ -152,4 +155,20 @@
Magento\Backend\Block\Template
+
+
+
+ - Magento_Catalog::products
+ - Magento_Sales::sales_order
+ - Magento_Customer::manage
+ - Magento_Cms::page
+
+
+ - catalog/product/index/
+ - sales/order/index/
+ - customer/index/index
+ - cms/page/index/
+
+
+
diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml
index 27fd16cc920dc..b6324416d26d5 100644
--- a/app/code/Magento/Backend/etc/adminhtml/system.xml
+++ b/app/code/Magento/Backend/etc/adminhtml/system.xml
@@ -215,7 +215,7 @@
European Union Countries
Magento\Directory\Model\Config\Source\Country
-
+
Top destinations
Magento\Directory\Model\Config\Source\Country
diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv
index f9f44f547e25b..aa28a670b9205 100644
--- a/app/code/Magento/Backend/i18n/en_US.csv
+++ b/app/code/Magento/Backend/i18n/en_US.csv
@@ -461,3 +461,7 @@ Pagination,Pagination
"Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used.","Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used."
"Anchor Text for Next","Anchor Text for Next"
"Theme Name","Theme Name"
+"In Products","In Products"
+"In Orders","In Orders"
+"In Customers","In Customers"
+"In Pages","In Pages"
diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml
index 40b7173f47417..8feccc9cf1b8f 100644
--- a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml
+++ b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml
@@ -29,7 +29,7 @@
data-mage-init='{"dropdown":{}}'
data-toggle="dropdown">
- = $block->escapeHtml($block->getUser()->getUsername()) ?>
+ = $block->escapeHtml($block->getUser()->getUserName()) ?>
{{trans "About Us"}}
-{{trans "Customer Service"}}
+ {{depend url_about_us}} ++ {{trans 'About Us' url_about_us=$url_about_us |raw}} +
+ {{/depend}} + {{depend url_customer_service}} ++ {{trans 'Customer Service' url_customer_service=$url_customer_service |raw}} +
+ {{/depend}}