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
Config
Source
Group
Multiselect.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Customer\Model\Config\Source\Group
;
7
8
use
Magento\Customer\Model\Customer\Attribute\Source\GroupSourceLoggedInOnlyInterface
;
9
use
Magento\Customer\Api\GroupManagementInterface
;
10
use
Magento\Framework\App\ObjectManager
;
11
12
class
Multiselect
implements
\Magento\Framework\Option\ArrayInterface
13
{
19
protected
$_options
;
20
25
protected
$_groupManagement
;
26
31
protected
$_converter
;
32
36
private
$groupSourceLoggedInOnly;
37
43
public
function
__construct
(
44
GroupManagementInterface
$groupManagement,
45
\
Magento
\Framework\Convert\
DataObject
$converter,
46
GroupSourceLoggedInOnlyInterface
$groupSourceLoggedInOnly =
null
47
) {
48
$this->_groupManagement = $groupManagement;
49
$this->_converter = $converter;
50
$this->groupSourceLoggedInOnly = $groupSourceLoggedInOnly
51
?:
ObjectManager::getInstance
()->get(GroupSourceLoggedInOnlyInterface::class);
52
}
53
59
public
function
toOptionArray
()
60
{
61
if
(!$this->_options) {
62
$this->_options = $this->groupSourceLoggedInOnly->toOptionArray();
63
}
64
return
$this->_options
;
65
}
66
}
Magento\Framework\App\ObjectManager\getInstance
static getInstance()
Definition:
ObjectManager.php:33
Magento\Customer\Model\Config\Source\Group\Multiselect\$_groupManagement
$_groupManagement
Definition:
Multiselect.php:25
Magento\Customer\Model\Config\Source\Group
Definition:
MultiselectTest.php:6
Magento\Customer\Model\Config\Source\Group\Multiselect\$_options
$_options
Definition:
Multiselect.php:19
Magento\Customer\Model\Config\Source\Group\Multiselect\__construct
__construct(GroupManagementInterface $groupManagement, \Magento\Framework\Convert\DataObject $converter, GroupSourceLoggedInOnlyInterface $groupSourceLoggedInOnly=null)
Definition:
Multiselect.php:43
Magento\Customer\Model\Customer\Attribute\Source\GroupSourceLoggedInOnlyInterface
Definition:
GroupSourceLoggedInOnlyInterface.php:15
Magento\Framework\Option\ArrayInterface
Definition:
ArrayInterface.php:11
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Customer\Model\Config\Source\Group\Multiselect\$_converter
$_converter
Definition:
Multiselect.php:31
Magento\Framework\App\ObjectManager
Definition:
ConfigCache.php:8
Magento\Customer\Model\Config\Source\Group\Multiselect\toOptionArray
toOptionArray()
Definition:
Multiselect.php:59
Magento
Magento\Customer\Model\Config\Source\Group\Multiselect
Definition:
Multiselect.php:12
Magento\Customer\Api\GroupManagementInterface
Definition:
GroupManagementInterface.php:14