alleyinteractive / alleyinteractive/elasticsearch-extensions
Add helper functions for adding and removing selected aggregations
- 主要言語
- PHP
- スター
- 5
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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:
コントリビューションガイド
評価
この issue はまだ評価されていません。