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)
Main Page
Related Pages
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
c
d
e
f
g
h
i
m
p
r
s
t
u
+
Functions
_
c
d
e
f
g
h
i
m
p
r
s
t
u
Variables
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
+
Functions
_
c
d
e
f
g
m
o
r
s
t
v
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
m
n
o
p
q
r
s
t
u
v
w
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
vendor
magento
module-catalog-rule
Model
Rule
CustomerGroupsOptionsProvider.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CatalogRule\Model\Rule
;
7
8
class
CustomerGroupsOptionsProvider
implements
\Magento\Framework\Data\OptionSourceInterface
9
{
13
private
$groupRepository;
14
18
private
$searchCriteriaBuilder;
19
23
private
$objectConverter;
24
30
public
function
__construct
(
31
\
Magento
\Customer\Api\
GroupRepositoryInterface
$groupRepository,
32
\
Magento
\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder,
33
\
Magento
\Framework\Convert\
DataObject
$objectConverter
34
) {
35
$this->groupRepository =
$groupRepository
;
36
$this->searchCriteriaBuilder =
$searchCriteriaBuilder
;
37
$this->objectConverter = $objectConverter;
38
}
39
43
public
function
toOptionArray
()
44
{
45
$customerGroups = $this->groupRepository->getList($this->searchCriteriaBuilder->create())->getItems();
46
return
$this->objectConverter->toOptionArray($customerGroups,
'id'
,
'code'
);
47
}
48
}
$groupRepository
$groupRepository
Definition:
customer_group.php:7
Magento\CatalogRule\Model\Rule\CustomerGroupsOptionsProvider\toOptionArray
toOptionArray()
Definition:
CustomerGroupsOptionsProvider.php:43
Magento\CatalogRule\Model\Rule
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\Framework\Data\OptionSourceInterface
Definition:
OptionSourceInterface.php:14
Magento\CatalogRule\Model\Rule\CustomerGroupsOptionsProvider\__construct
__construct(\Magento\Customer\Api\GroupRepositoryInterface $groupRepository, \Magento\Framework\Api\SearchCriteriaBuilder $searchCriteriaBuilder, \Magento\Framework\Convert\DataObject $objectConverter)
Definition:
CustomerGroupsOptionsProvider.php:30
Magento
$searchCriteriaBuilder
$searchCriteriaBuilder
Definition:
order_rollback.php:15
Magento\CatalogRule\Model\Rule\CustomerGroupsOptionsProvider
Definition:
CustomerGroupsOptionsProvider.php:8
Magento\Customer\Api\GroupRepositoryInterface
Definition:
GroupRepositoryInterface.php:13