alleyinteractive / alleyinteractive/elasticsearch-extensions

Add helper functions for adding and removing selected aggregations

オープン
#34 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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:

```php

```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。