|
@@ -365,6 +365,7 @@ class EdlpSearchController extends ControllerBase {
|
|
|
// dpm($items);
|
|
|
|
|
|
$this->items = [];
|
|
|
+ $ids = [];
|
|
|
foreach ($items as $item) {
|
|
|
try {
|
|
|
/** @var \Drupal\Core\Entity\EntityInterface $entity */
|
|
@@ -376,7 +377,12 @@ class EdlpSearchController extends ControllerBase {
|
|
|
if (!$entity) {
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
+ // get distinct results
|
|
|
+ if(in_array($entity->id(), $ids)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ $ids[] = $entity->id();
|
|
|
+ // record results
|
|
|
$this->items[] = $entity;
|
|
|
}
|
|
|
// dpm($this->items);
|