+
+ # Filters to apply when visiting the model.
+ #
+ # See ModelFilters for configuration.
+ var filter: ModelFilter is lazy, writable, optional do
+ return new ModelFilter(
+ min_visibility = protected_visibility,
+ accept_fictive = false,
+ accept_test = false,
+ accept_example = false,
+ accept_redef = true,
+ accept_extern = true,
+ accept_attribute = true,
+ accept_empty_doc = true
+ )
+ end
+
+ # Should we accept this `mentity` from the view?
+ #
+ # If no `override_filter` is passed then use `self.filter`.
+ fun accept_mentity(mentity: MEntity, override_filter: nullable ModelFilter): Bool do
+ if override_filter != null then
+ return override_filter.accept_mentity(mentity)
+ end
+ return filter.accept_mentity(mentity)
+ end