|
@@ -5,8 +5,7 @@ namespace Drupal\edlp_search\Controller;
|
|
use Drupal\Core\Controller\ControllerBase;
|
|
use Drupal\Core\Controller\ControllerBase;
|
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
|
use Drupal\Core\Entity\EntityStorageInterface;
|
|
use Drupal\Core\Entity\EntityStorageInterface;
|
|
-// use Drupal\facets\FacetManager\DefaultFacetManager;
|
|
|
|
-// use Drupal\search_api_page\Entity\SearchApiPage;
|
|
|
|
|
|
+use Symfony\Component\HttpFoundation\Request;
|
|
use Drupal\Core\Form\FormBuilder;
|
|
use Drupal\Core\Form\FormBuilder;
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
|
use Symfony\Component\HttpFoundation\JsonResponse;
|
|
|
|
|
|
@@ -88,10 +87,14 @@ class EdlpSearchController extends ControllerBase {
|
|
'#markup' => $this->t('Implement method: searchResults')
|
|
'#markup' => $this->t('Implement method: searchResults')
|
|
];
|
|
];
|
|
}
|
|
}
|
|
- public function searchResultsJson(){
|
|
|
|
|
|
+ public function searchResultsJson(Request $request){
|
|
|
|
+
|
|
|
|
+ $keys = $request->query->get('keys');
|
|
|
|
+
|
|
$response = new JsonResponse();
|
|
$response = new JsonResponse();
|
|
$response->setData([
|
|
$response->setData([
|
|
'test'=>'search results',
|
|
'test'=>'search results',
|
|
|
|
+ 'keys'=>$keys
|
|
// 'rendered'=> $rendered,
|
|
// 'rendered'=> $rendered,
|
|
]);
|
|
]);
|
|
return $response;
|
|
return $response;
|