alleyinteractive / alleyinteractive/elasticsearch-extensions

Add helper functions for adding and removing selected aggregations

Đang mở
#34 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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:

```php

```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.