added js library to edlp_search

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-19 00:20:14 +01:00
parent ff495add52
commit 973483a6eb
4 changed files with 34 additions and 3 deletions
@@ -5,8 +5,7 @@ namespace Drupal\edlp_search\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
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 Symfony\Component\HttpFoundation\JsonResponse;
@@ -88,10 +87,14 @@ class EdlpSearchController extends ControllerBase {
'#markup' => $this->t('Implement method: searchResults')
];
}
public function searchResultsJson(){
public function searchResultsJson(Request $request){
$keys = $request->query->get('keys');
$response = new JsonResponse();
$response->setData([
'test'=>'search results',
'keys'=>$keys
// 'rendered'=> $rendered,
]);
return $response;