根据Octobercms documentation,我可以从模型类方法中获取选项。
但是当我尝试过滤列表时,出现了未定义的索引错误。
... / modules / backend / Widgets / Filter.php的第417行上的“未定义索引:holiday_type”
我在做什么错?我想通过模型类从方法中获取选项
config_filter.yaml
line+" "+your_annotation
MyModel.php
# ===================================
# Filter Scope Definitions
# ===================================
scopes:
holiday_type:
label: Holiday Type
type: group
conditions: type in (:filtered)
options: getHolidayTypesAttribute