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-search
Model
Autocomplete.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Search\Model
;
7
8
class
Autocomplete
implements
AutocompleteInterface
9
{
13
private
$dataProviders;
14
18
public
function
__construct
(
19
array $dataProviders
20
) {
21
$this->dataProviders = $dataProviders;
22
ksort($this->dataProviders);
23
}
24
28
public
function
getItems
()
29
{
30
$data
= [];
31
foreach
($this->dataProviders as $dataProvider) {
32
$data
= array_merge(
$data
, $dataProvider->getItems());
33
}
34
35
return
$data
;
36
}
37
}
Magento\Search\Model\AutocompleteInterface
Definition:
AutocompleteInterface.php:15
Magento\Search\Model\Autocomplete
Definition:
Autocomplete.php:8
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Search\Model
Magento\Search\Model\Autocomplete\__construct
__construct(array $dataProviders)
Definition:
Autocomplete.php:18
Magento\Search\Model\Autocomplete\getItems
getItems()
Definition:
Autocomplete.php:28