File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
docs/apis/plugintypes/qbank Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,21 @@ class myfilter_condition extends condition {
4747}
4848```
4949
50- Define the ` get_name() ` method, which returns the label displayed in the filter UI.
50+ Modify your ` plugin_feature ` class to return an instance of your condition from the ` get_question_filters() ` method:
51+
52+ ``` php title="question/bank/myplugin/classes/plugin_feature.php"
53+ namespace qbank_myplugin;
54+
55+ class plugin_feature extends core_question\local\bank\plugin_features_base {
56+ public function get_question_filters(?core_question\local\bank\view $qbank = null): array {
57+ return [
58+ new myfilter_condition($qbank),
59+ ];
60+ }
61+ }
62+ ```
63+
64+ Back in your ` condition ` class, define the ` get_name() ` method, which returns the label displayed in the filter UI.
5165
5266``` php title="Define the condition name"
5367public function get_name(): string {
You can’t perform that action at this time.
0 commit comments