entrees index and notice are ajax loaed and displayed

This commit is contained in:
Bachir Soussi Chiadmi
2018-03-08 18:25:33 +01:00
parent 3980479031
commit 6d1b3d33bb
15 changed files with 311 additions and 35 deletions
@@ -53,12 +53,23 @@ class EdlpAjaxController extends ControllerBase {
$renderable = $this->toRenderable();
$rendered = render($renderable);
switch($this->entity_type){
case 'node':
$bundle = $this->entity->getType();
break;
case 'taxonomy_term':
$bundle = $this->entity->bundle();
break;
default:
$bundle = NULL;
}
$response = new JsonResponse();
$response->setData([
'test' => 'hello edlp ajax',
'id' => $this->id,
'view_mode' => $this->viewmode,
'bundle' => $this->entity->getType(),
'bundle' => $bundle,
'entity_type' => $this->entity_type,
'rendered'=> $rendered,
]);