function
OptionFilterFor
OptionFilterFor limits an option-filter rule to one target of a polymorphic relationship.
Arguments
| Argument | Type | Description |
|---|---|---|
collection | string | The collection value. |
targetPath | string | The targetPath value. |
operator | RelationshipFilterOperator | The operator value. |
sourcePath | string | The sourcePath value. |
Returns
The declared result.
RelationshipFilterRuleFull signature
func OptionFilterFor(
collection,
targetPath string,
operator RelationshipFilterOperator,
sourcePath string,
) RelationshipFilterRuleRelated types
RelationshipFilterOperatorRelationshipFilterOperator is the finite predicate vocabulary used to narrow admin options.
RelationshipFilterRuleRelationshipFilterRule derives one target predicate from current document data. Collection optionally limits the rule to one target of a polymorphic relationship.