diff --git a/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php b/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
index f6f969bd3bc90..a98e76285ce08 100644
--- a/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
+++ b/app/code/Magento/Config/Model/Config/Backend/Admin/Robots.php
@@ -13,7 +13,7 @@
use Magento\Framework\App\ObjectManager;
/**
- * @api
+ * @deprecated robots.txt file is no longer stored in filesystem. It generates as response on request.
*/
class Robots extends \Magento\Framework\App\Config\Value
{
diff --git a/app/code/Magento/Customer/Block/CustomerScopeData.php b/app/code/Magento/Customer/Block/CustomerScopeData.php
new file mode 100644
index 0000000000000..244437e870b98
--- /dev/null
+++ b/app/code/Magento/Customer/Block/CustomerScopeData.php
@@ -0,0 +1,53 @@
+storeManager = $context->getStoreManager();
+ $this->jsonEncoder = $jsonEncoder;
+ }
+
+ /**
+ * Return id of current website
+ *
+ * Can be used when necessary to obtain website id of the current customer.
+ *
+ * @return integer
+ */
+ public function getWebsiteId()
+ {
+ return (int)$this->_storeManager->getStore()->getWebsiteId();
+ }
+}
diff --git a/app/code/Magento/Customer/CustomerData/Customer.php b/app/code/Magento/Customer/CustomerData/Customer.php
index afac3020fbcbb..35fcb63ceb157 100644
--- a/app/code/Magento/Customer/CustomerData/Customer.php
+++ b/app/code/Magento/Customer/CustomerData/Customer.php
@@ -19,6 +19,11 @@ class Customer implements SectionSourceInterface
*/
protected $currentCustomer;
+ /**
+ * @var View
+ */
+ private $customerViewHelper;
+
/**
* @param CurrentCustomer $currentCustomer
* @param View $customerViewHelper
@@ -39,10 +44,12 @@ public function getSectionData()
if (!$this->currentCustomer->getCustomerId()) {
return [];
}
+
$customer = $this->currentCustomer->getCustomer();
return [
'fullname' => $this->customerViewHelper->getCustomerName($customer),
'firstname' => $customer->getFirstname(),
+ 'websiteId' => $customer->getWebsiteId(),
];
}
}
diff --git a/app/code/Magento/Customer/Test/Unit/Block/CustomerScopeDataTest.php b/app/code/Magento/Customer/Test/Unit/Block/CustomerScopeDataTest.php
new file mode 100644
index 0000000000000..dcbe4882231ca
--- /dev/null
+++ b/app/code/Magento/Customer/Test/Unit/Block/CustomerScopeDataTest.php
@@ -0,0 +1,81 @@
+contextMock = $this->getMockBuilder(Context::class)
+ ->disableOriginalConstructor()
+ ->getMock();
+
+ $this->storeManagerMock = $this->getMockBuilder(StoreManagerInterface::class)
+ ->getMock();
+
+ $this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class)
+ ->getMock();
+
+ $this->encoderMock = $this->getMockBuilder(EncoderInterface::class)
+ ->getMock();
+
+ $this->contextMock->expects($this->exactly(2))
+ ->method('getStoreManager')
+ ->willReturn($this->storeManagerMock);
+
+ $this->contextMock->expects($this->once())
+ ->method('getScopeConfig')
+ ->willReturn($this->scopeConfigMock);
+
+ $this->model = new CustomerScopeData(
+ $this->contextMock,
+ $this->encoderMock,
+ []
+ );
+ }
+
+ public function testGetWebsiteId()
+ {
+ $storeId = 1;
+
+ $storeMock = $this->getMockBuilder(StoreInterface::class)
+ ->setMethods(['getWebsiteId'])
+ ->getMockForAbstractClass();
+
+ $storeMock->expects($this->any())
+ ->method('getWebsiteId')
+ ->willReturn($storeId);
+
+ $this->storeManagerMock->expects($this->any())
+ ->method('getStore')
+ ->with(null)
+ ->willReturn($storeMock);
+
+ $this->assertEquals($storeId, $this->model->getWebsiteId());
+ }
+}
diff --git a/app/code/Magento/Customer/view/frontend/layout/default.xml b/app/code/Magento/Customer/view/frontend/layout/default.xml
index c6d8ae5371fc6..94e46fda194b0 100644
--- a/app/code/Magento/Customer/view/frontend/layout/default.xml
+++ b/app/code/Magento/Customer/view/frontend/layout/default.xml
@@ -45,6 +45,8 @@
+