Skip to content

Commit 556cf8a

Browse files
committed
MAGETWO-44333: Move Search API to Framework to Make Grid Component work through them
- Added empty classes for webapi
1 parent 5331902 commit 556cf8a

File tree

5 files changed

+33
-2
lines changed

5 files changed

+33
-2
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Search\Api;
7+
8+
use Magento\Framework\Api\Search\SearchInterface as FrameworkSearchInterface;
9+
10+
/**
11+
* Search API for all requests
12+
*/
13+
interface SearchInterface extends FrameworkSearchInterface
14+
{
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Search\Model;
7+
8+
use Magento\Framework\Search\Search as FrameworkSearch;
9+
use Magento\Search\Api\SearchInterface;
10+
11+
/**
12+
* Search extended implementation for WebApi
13+
*/
14+
class Search extends FrameworkSearch implements SearchInterface
15+
{
16+
}

app/code/Magento/Search/etc/di.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
10+
<preference for="Magento\Search\Api\SearchInterface" type="Magento\Search\Model\Search"/>
1011
<type name="Magento\Framework\Module\Setup\Migration">
1112
<arguments>
1213
<argument name="compositeModules" xsi:type="array">

app/code/Magento/Search/etc/webapi.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Webapi:etc/webapi.xsd">
1010

1111
<route url="/V1/search" method="GET">
12-
<service class="Magento\Framework\Api\Search\SearchInterface" method="search"/>
12+
<service class="Magento\Search\Api\SearchInterface" method="search"/>
1313
<resources>
1414
<resource ref="anonymous" />
1515
</resources>

app/etc/di.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
<preference for="Magento\Framework\Api\ImageProcessorInterface" type="Magento\Framework\Api\ImageProcessor" />
140140
<preference for="Magento\Framework\Code\Reader\ClassReaderInterface" type="Magento\Framework\Code\Reader\ClassReader" />
141141
<preference for="Magento\Framework\Stdlib\DateTime\DateTimeFormatterInterface" type="Magento\Framework\Stdlib\DateTime\DateTimeFormatter"/>
142-
<preference for="Magento\Framework\Api\Search\SearchInterface" type="Magento\Framework\Search\Search"/>
143142
<type name="Magento\Framework\Model\ResourceModel\Db\TransactionManager" shared="false" />
144143
<type name="Magento\Framework\Logger\Handler\Base">
145144
<arguments>

0 commit comments

Comments
 (0)