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
CustomerGroupConfig.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Customer\Model
;
8
12
class
CustomerGroupConfig
implements
\Magento\Customer\Api\CustomerGroupConfigInterface
13
{
17
private
$config;
18
22
private
$groupRepository;
23
28
public
function
__construct
(
29
\
Magento
\
Config
\Model\
Config
$config,
30
\
Magento
\
Customer
\Api\
GroupRepositoryInterface
$groupRepository
31
) {
32
$this->config =
$config
;
33
$this->groupRepository =
$groupRepository
;
34
}
35
39
public
function
setDefaultCustomerGroup
(
$id
)
40
{
41
if
($this->groupRepository->getById(
$id
)) {
42
$this->config->setDataByPath(
43
\
Magento
\
Customer
\Model\
GroupManagement::XML_PATH_DEFAULT_ID
,
44
$id
45
);
46
$this->config->save();
47
}
48
49
return
$id
;
50
}
51
}
Magento\Customer\Model\CustomerGroupConfig\setDefaultCustomerGroup
setDefaultCustomerGroup($id)
Definition:
CustomerGroupConfig.php:39
Magento\Customer\Model\CustomerGroupConfig\__construct
__construct(\Magento\Config\Model\Config $config, \Magento\Customer\Api\GroupRepositoryInterface $groupRepository)
Definition:
CustomerGroupConfig.php:28
$groupRepository
$groupRepository
Definition:
customer_group.php:7
$config
$config
Definition:
fraud_order.php:17
$id
$id
Definition:
fieldset.phtml:14
Magento\Customer\Model\GroupManagement\XML_PATH_DEFAULT_ID
const XML_PATH_DEFAULT_ID
Definition:
GroupManagement.php:25
Magento
Magento\Customer\Model\CustomerGroupConfig
Definition:
CustomerGroupConfig.php:12
Magento\Customer\Api\CustomerGroupConfigInterface
Definition:
CustomerGroupConfigInterface.php:14
Magento\Customer\Api\GroupRepositoryInterface
Definition:
GroupRepositoryInterface.php:13
Magento\Framework\App\ResourceConnection\Config
Definition:
Config.php:14
Magento\Customer\Model\Customer
Definition:
Customer.php:46
Magento\Customer\Model
Definition:
AccountManagementTest.php:7