public function AbstractSolrEntityListBuilder::getNotRecommendedEntities in Search API Solr 8.3
Same name and namespace in other branches
- 4.x src/Controller/AbstractSolrEntityListBuilder.php \Drupal\search_api_solr\Controller\AbstractSolrEntityListBuilder::getNotRecommendedEntities()
Get all not recommended entities.
Return value
array An array of all not recommended entities.
Throws
\Drupal\search_api\SearchApiException
File
- src/
Controller/ AbstractSolrEntityListBuilder.php, line 329
Class
- AbstractSolrEntityListBuilder
- Provides a listing of Solr Entities.
Namespace
Drupal\search_api_solr\ControllerCode
public function getNotRecommendedEntities() : array {
$entities = $this
->load();
foreach ($entities as $key => $entity) {
if ($entity
->isRecommended()) {
unset($entities[$key]);
}
}
return $entities;
}