reinstalled all contribs with composer

need to run :
drush ev 'drupal_flush_all_caches();'
drush cr
and restart nginx and php-fpm before loading the website
This commit is contained in:
2019-04-30 19:27:47 +02:00
parent e1f9bb3cd0
commit 9da6cf9927
373 changed files with 3392 additions and 5 deletions
@@ -0,0 +1,71 @@
<?php
// use Drupal\Core\Url;
function template_preprocess_edlp_agenda(&$vars){
// dpm($vars);
/*
@see https://www.drupal8.ovh/index.php/en/tutoriels/339/render-a-node-or-an-entity
*/
$view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
// if(isset($vars['next_event_node'])){
// $vars['next_event'] = array(
// "#markup"=>"<h3>Prochaine Date</h3>",
// "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"=>"<h3>".t("Upcoming Events")."</h3>",
"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"=>"<h3>".t("Past Events")."</h3>",
"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"=>
// )
// );
}