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
framework
GraphQl
Query
Resolver
Argument
Filter
Operator.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter
;
9
10
use
Magento\Framework\Phrase
;
11
17
class
Operator
18
{
22
const
__DEFAULT
=
self::AND
;
23
27
const
OR
=
'or'
;
28
32
const
AND
=
'and'
;
33
37
private
$value;
38
43
public
function
__construct
(
string
$value =
null
)
44
{
45
if
(!$value) {
46
$value =
self::AND
;
47
}
48
$type
= new \ReflectionClass($this);
49
if
(!in_array($value,
$type
->getConstants())) {
50
throw
new \Magento\Framework\GraphQl\Exception\GraphQlInputException(
51
new
Phrase
(
'%1 operator not supported'
, [$value])
52
);
53
}
54
$this->
value
= $value;
55
}
56
62
public
static
function
getOperators
() : array
63
{
64
$type
= new \ReflectionClass(Operator::class);
65
return
$type
->getConstants();
66
}
67
73
public
function
__toString
() : string
74
{
75
return
strtoupper($this->
value
);
76
}
77
}
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\__construct
__construct(string $value=null)
Definition:
Operator.php:43
value
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition:
block.php:9
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\__DEFAULT
const __DEFAULT
Definition:
Operator.php:22
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\getOperators
static getOperators()
Definition:
Operator.php:62
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\OR
const OR
Definition:
Operator.php:27
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter
Definition:
Clause.php:8
$type
$type
Definition:
item.phtml:13
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\__toString
__toString()
Definition:
Operator.php:73
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator\AND
const AND
Definition:
Operator.php:32
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase
Magento\Framework\GraphQl\Query\Resolver\Argument\Filter\Operator
Definition:
Operator.php:17