Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,27 @@ views.style.format_strawberryfield_views_leaflet:
type: string
label: 'Max leaflet Zoom'
default: 22

views.filter.sbf_ado_filter:
type: views_filter
label: 'Strawberry ADO filter'
mapping:
operator:
type: string
label: 'Operator'
value:
type: array
label: 'Values'
expose:
type: mapping
label: 'Expose'
mapping:
reduce:
type: boolean
label: 'Reduce'
group_info:
mapping:
group_items:
sequence:
type: views.filter.group_item.in_operator
label: 'Group item'
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function format_strawberryfield_views_views_data_alter(array &$data) {

$sbf_join_field = _search_api_views_find_field_alias('sbf_flavors_join', $table);
$table[$sbf_join_field] = [
'title' => t('Strawberry Flavor to Node Join.'),
'title' => t('Strawberry Flavor to Node Join'),
'group' => t('Search'),
'help' => t('Joins Strawberry Flavor Search API datasources (e.g OCR) to Nodes (ADO) when doing a Full Text Search.'),
'filter' => [
Expand All @@ -197,6 +197,25 @@ function format_strawberryfield_views_views_data_alter(array &$data) {
// @TODO add also an argument ID if relationships are enabled to
// $table[$advanced_fulltext_field]['argument']['id'] = 'sbf_advanced_search_api_fulltext';
// Requires a special Argument Plugin. Not needed right now.

$ado_filter = _search_api_views_find_field_alias('sbf_ado_filter', $table);
$table[$ado_filter] = [
'title' => t('Similar ADO Filter (Experimental)'),
'group' => t('Search'),
'help' => t('Filters one or more Node Entity against Search API fields, resolving dynamically values for the input Node(s) using the destination Field property paths.'),
'filter' => [
'title' => t('Similar ADO Filter'),
'field' => 'id',
'id' => 'sbf_ado_filter',
],
];
if ($ado_filter != 'sbf_ado_filter') {
$table[$ado_filter]['real field'] = 'sbf_ado_filter';
}




}
catch (\Exception $e) {
$args = [
Expand Down
Loading