getViewBuilder('node');
// if(isset($vars['next_event_node'])){
// $vars['next_event'] = array(
// "#markup"=>"
Prochaine Date
",
// "event"=>$view_builder->view($vars['next_event_node'], 'default')
// );
// }
if(count($vars['coming_events_nodes'])){
$future_list = array (
'#theme' => 'item_list',
'#items' => [],
);
foreach($vars['coming_events_nodes'] as $node){
$future_list['#items'][] = $view_builder->view($node, 'teaser');
}
$vars['coming_events'] = array(
"#type"=>"container",
"#attributes"=>array(
"class"=>['future-events']
),
"#markup"=>"".t("Upcoming Events")."
",
"future_events"=>$future_list
);
}
$past_list = array (
'#theme' => 'item_list',
'#items' => [],
);
foreach($vars['past_events_nodes'] as $node){
$past_list['#items'][] = $view_builder->view($node, 'teaser');
}
$vars['past_events'] = array(
"#type"=>"container",
"#attributes"=>array(
"class"=>['past-events']
),
"#markup"=>"".t("Past Events")."
",
"past_events"=>$past_list
);
// return array(
// "#type" => "container",
// "#attributes"=>array(
// "id"=>['agenda']
// ),
// "future_past"=>array(
// "#type"=>"container",
// "#attributes"=>array(
// "class"=>['future-past-events', 'column', 'os-scroll']
// ),
// "future"=>,
// "past"=>
// )
// );
}