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:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
function template_preprocess_edlp_search_results(&$vars){
|
||||
// dpm($vars);
|
||||
|
||||
$view_builder = \Drupal::entityTypeManager()->getViewBuilder('node');
|
||||
|
||||
$items = [];
|
||||
if(count($vars['items'])){
|
||||
foreach ($vars['items'] as $item) {
|
||||
$items[] = $view_builder->view($item, 'search_index');
|
||||
}
|
||||
}
|
||||
|
||||
$vars['items'] = $items;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
function template_preprocess_edlp_search_search_form(&$vars){
|
||||
// dpm($vars);
|
||||
/*
|
||||
@see https://www.drupal8.ovh/index.php/en/tutoriels/339/render-a-node-or-an-entity
|
||||
*/
|
||||
// $view_builder = \Drupal::entityTypeManager()->getViewBuilder($vars['entity_type']);
|
||||
// $vars['content'] = $view_builder->view($vars['entity'], $vars['view_mode']);
|
||||
}
|
||||
Reference in New Issue
Block a user