Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-customer
Model
Customer
Attribute
Backend
Website.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Model\Customer\Attribute\Backend
;
7
13
class
Website
extends
\Magento\Eav\Model\Entity\Attribute\Backend\AbstractBackend
14
{
18
protected
$_storeManager
;
19
23
public
function
__construct
(\
Magento
\
Store
\Model\
StoreManagerInterface
$storeManager
)
24
{
25
$this->_storeManager =
$storeManager
;
26
}
27
34
public
function
beforeSave
($object)
35
{
36
if
($object->getId()) {
37
return
$this;
38
}
39
40
if
(!$object->hasData(
'website_id'
)) {
41
$object->setData(
'website_id'
, $this->_storeManager->getStore()->getWebsiteId());
42
}
43
44
return
$this;
45
}
46
}
Magento\Customer\Model\Customer\Attribute\Backend\Website
Definition:
Website.php:13
$storeManager
$storeManager
Definition:
paypal_quote.php:14
Magento\Customer\Model\Customer\Attribute\Backend
Definition:
Billing.php:6
Magento\Store\Model\StoreManagerInterface
Definition:
StoreManagerInterface.php:17
Magento
Magento\Customer\Model\Customer\Attribute\Backend\Store
Definition:
Store.php:13
Magento\Customer\Model\Customer\Attribute\Backend\Website\beforeSave
beforeSave($object)
Definition:
Website.php:34
Magento\Customer\Model\Customer\Attribute\Backend\Website\$_storeManager
$_storeManager
Definition:
Website.php:18
Magento\Customer\Model\Customer\Attribute\Backend\Website\__construct
__construct(\Magento\Store\Model\StoreManagerInterface $storeManager)
Definition:
Website.php:23