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-elasticsearch
SearchAdapter
Aggregation
DataProviderFactory.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Elasticsearch\SearchAdapter\Aggregation
;
8
9
use
Magento\Elasticsearch\SearchAdapter\QueryAwareInterface
;
10
use
Magento\Elasticsearch\SearchAdapter\QueryContainer
;
11
use
Magento\Framework\ObjectManagerInterface
;
12
use
Magento\Framework\Search\Dynamic\DataProviderInterface
;
13
18
class
DataProviderFactory
19
{
25
private
$objectManager;
26
30
public
function
__construct
(
ObjectManagerInterface
$objectManager)
31
{
32
$this->objectManager =
$objectManager
;
33
}
34
55
public
function
create
(
DataProviderInterface
$dataProvider,
QueryContainer
$query
=
null
)
56
{
57
$result
= $dataProvider;
58
if
($dataProvider instanceof
QueryAwareInterface
) {
59
if
(
null
===
$query
) {
60
throw
new \LogicException(
61
'Instance of '
. QueryAwareInterface::class .
' must be configured with a search query,'
62
.
' but the query is empty'
63
);
64
}
65
66
$className
= get_class($dataProvider);
67
$result
= $this->objectManager->create(
$className
, [
'queryContainer'
=>
$query
]);
68
}
69
70
return
$result
;
71
}
72
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Elasticsearch\SearchAdapter\QueryAwareInterface
Definition:
QueryAwareInterface.php:17
$objectManager
$objectManager
Definition:
bootstrap.php:17
Magento\Elasticsearch\SearchAdapter\Aggregation\DataProviderFactory
Definition:
DataProviderFactory.php:18
Magento\Elasticsearch\SearchAdapter\Aggregation
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Elasticsearch\SearchAdapter\QueryContainer
Definition:
QueryContainer.php:13
Magento\Elasticsearch\SearchAdapter\Aggregation\DataProviderFactory\__construct
__construct(ObjectManagerInterface $objectManager)
Definition:
DataProviderFactory.php:30
Magento\Elasticsearch\SearchAdapter\Aggregation\DataProviderFactory\create
create(DataProviderInterface $dataProvider, QueryContainer $query=null)
Definition:
DataProviderFactory.php:55
$query
$query
Definition:
popular_query.php:9
Magento\Framework\Search\Dynamic\DataProviderInterface
Definition:
DataProviderInterface.php:16
$className
if($currentSelectedMethod==$_code) $className
Definition:
form.phtml:31