Skip to content

Commit a3a49f8

Browse files
georgmaisseribernhardf
authored andcommitted
Bugfix: add add_options method to callback class.
1 parent 3712074 commit a3a49f8

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

classes/filters/types/callback.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,20 @@ public function filter_by_callback(array $records, $not = false) {
134134
}
135135
return $returnarray;
136136
}
137+
138+
/**
139+
* This function takes a key value pair of options.
140+
* Only if there are actual results in the table, these options will be displayed.
141+
* The keys are the results, the values are the localized strings.
142+
* For the standard filter, it's not necessary to provide these options...
143+
* They will be gathered automatically.
144+
*
145+
* @param array $options
146+
* @return void
147+
*/
148+
public function add_options(array $options = []) {
149+
foreach ($options as $key => $value) {
150+
$this->options[$key] = $value;
151+
}
152+
}
137153
}

0 commit comments

Comments
 (0)