Skip to content
Snippets Groups Projects
Commit 95a3a0d5 authored by Mohamed Anis Taktak's avatar Mohamed Anis Taktak
Browse files

add correction

parent 2797f691
No related branches found
No related tags found
No related merge requests found
......@@ -51,14 +51,10 @@ class Snippet extends NumericField {
$node_renderer = \Drupal::entityManager()->getViewBuilder('node');
$node = $this->getEntity($values);
//Todo:langcode
//$langcode = $this->getValue($values);
//Todo:langcode
// $node = $node->getTranslation($langcode);
$build = $node_renderer->view($node, 'search_result');
unset($build['#theme']);
$node_rendered = drupal_render($build);
// Fetch comment count for snippet.
//Todo:langcode
$keys = $this->view->getExposedInput()['keys'];
$output = $node_rendered->__toString();
$snippet = search_excerpt($keys, $output);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment