new mobile home #423
This commit is contained in:
@@ -35,7 +35,7 @@ class HomeController extends ControllerBase {
|
||||
->condition('type', 'static');
|
||||
|
||||
$promoted_nids = $query->execute();
|
||||
$contents["#promoted_nodes"] = entity_load_multiple('node', $promoted_nids);
|
||||
$contents["#promoted_statics"] = entity_load_multiple('node', $promoted_nids);
|
||||
|
||||
// then get production pages
|
||||
$query = \Drupal::entityQuery('node')
|
||||
@@ -44,7 +44,7 @@ class HomeController extends ControllerBase {
|
||||
->condition('type', 'page');
|
||||
|
||||
$promoted_nids = $query->execute();
|
||||
$contents["#promoted_nodes"] += entity_load_multiple('node', $promoted_nids);
|
||||
$contents["#promoted_prods"] = entity_load_multiple('node', $promoted_nids);
|
||||
|
||||
// presentation
|
||||
// $query = \Drupal::entityQuery('node')
|
||||
@@ -137,7 +137,7 @@ class HomeController extends ControllerBase {
|
||||
->condition('type', 'static');
|
||||
|
||||
$promoted_nids = $query->execute();
|
||||
$renderable["#promoted_nodes"] = entity_load_multiple('node', $promoted_nids);
|
||||
$renderable["#promoted_statics"] = entity_load_multiple('node', $promoted_nids);
|
||||
|
||||
// then get production pages
|
||||
$query = \Drupal::entityQuery('node')
|
||||
@@ -146,7 +146,7 @@ class HomeController extends ControllerBase {
|
||||
->condition('type', 'page');
|
||||
|
||||
$promoted_nids = $query->execute();
|
||||
$renderable["#promoted_nodes"] += entity_load_multiple('node', $promoted_nids);
|
||||
$renderable["#promoted_prods"] = entity_load_multiple('node', $promoted_nids);
|
||||
|
||||
// last fil
|
||||
// $query = \Drupal::entityQuery('node')
|
||||
@@ -160,9 +160,9 @@ class HomeController extends ControllerBase {
|
||||
// $renderable["#last_fil_node"] = array('#markup'=>'En développement.');
|
||||
|
||||
// agenda
|
||||
/*
|
||||
$now = new DrupalDateTime('now');
|
||||
$now->setTimezone(new \DateTimeZone(DATETIME_STORAGE_TIMEZONE));
|
||||
|
||||
$query = \Drupal::entityQuery('node')
|
||||
->condition('status', 1)
|
||||
->condition('type', 'evenement')
|
||||
@@ -172,7 +172,7 @@ class HomeController extends ControllerBase {
|
||||
|
||||
$events = $query->execute();
|
||||
$renderable['#agenda_items'] = entity_load_multiple('node', $events);
|
||||
|
||||
*/
|
||||
|
||||
// Collection
|
||||
// TODO: get the link to mobile collection page
|
||||
@@ -182,7 +182,19 @@ class HomeController extends ControllerBase {
|
||||
'internal_path' => $collection_url->getInternalPath(),
|
||||
);
|
||||
|
||||
// Production
|
||||
$production_url = Url::fromRoute('edlp_productions.productions');
|
||||
$renderable['#production_link'] = array(
|
||||
'url' => $production_url,
|
||||
'internal_path' => $production_url->getInternalPath(),
|
||||
);
|
||||
|
||||
// Agenda
|
||||
$agenda_url = Url::fromRoute('edlp_agenda.agenda');
|
||||
$renderable['#agenda_link'] = array(
|
||||
'url' => $agenda_url,
|
||||
'internal_path' => $agenda_url->getInternalPath(),
|
||||
);
|
||||
|
||||
return $renderable;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user