alleyinteractive / alleyinteractive/elasticsearch-extensions
Add helper functions for adding and removing selected aggregations
- Ngôn ngữ chính
- PHP
- Star
- 5
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
For templating, it would be helpful to have helper functions for adding and removing selected aggregations to support interfaces that include a list of selected aggregations with a button to remove them. The button could be configured as a link which would remove the selected aggregation by removing the query string value for it. We can't just use `add_query_var` on this because the query var is actually a nested structure (e.g., `fs['taxonomy_category'][] = 'my-selected-term'`).
Proposal would be to add something like this:
```php
function add_selected_aggregation( Aggregation $aggregation, string $value ): string;
function remove_selected_aggregation( Aggregation $aggregation, string $value ): string;
```
These functions could then be used via the `elasticsearch_extensions()` helper, like:
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.