entrees index and notice are ajax loaed and displayed
This commit is contained in:
@@ -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,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user