production page can now filter the cospus map
This commit is contained in:
@@ -176,7 +176,9 @@ class EdlpAjaxController extends ControllerBase {
|
||||
'rendered'=> $rendered,
|
||||
];
|
||||
|
||||
// if content type page (productions) get the menu items and linked dates
|
||||
// if content type page (productions) :
|
||||
// -- get the menu items and linked dates
|
||||
// -- get the linked documents for corpus map
|
||||
if($this->bundle == "page"){
|
||||
$menuLinkManager = \Drupal::service('plugin.manager.menu.link');
|
||||
$links = $menuLinkManager->loadLinksByRoute('entity.node.canonical', array('node' => $this->id), 'productions');
|
||||
@@ -195,6 +197,15 @@ class EdlpAjaxController extends ControllerBase {
|
||||
}
|
||||
}
|
||||
$data['menu_parents'] = $menu_parents;
|
||||
|
||||
// Documents liés
|
||||
$documents_lies = $this->entity->get('field_documents_lies')->getValue();
|
||||
if(count($documents_lies)){
|
||||
foreach ($documents_lies as $key => $field) {
|
||||
$data['documents_lies'][] = $field['target_id'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// translations links
|
||||
|
||||
Reference in New Issue
Block a user