Class: Banzai::Filter::References::FeatureFlagReferenceFilter
- Inherits:
-
IssuableReferenceFilter
- Object
- HTML::Pipeline::Filter
- ReferenceFilter
- AbstractReferenceFilter
- IssuableReferenceFilter
- Banzai::Filter::References::FeatureFlagReferenceFilter
- Defined in:
- lib/banzai/filter/references/feature_flag_reference_filter.rb
Constant Summary
Constants included from Concerns::TimeoutFilterHandler
Concerns::TimeoutFilterHandler::COMPLEX_MARKDOWN_MESSAGE, Concerns::TimeoutFilterHandler::RENDER_TIMEOUT, Concerns::TimeoutFilterHandler::SANITIZATION_RENDER_TIMEOUT
Constants included from Concerns::PipelineTimingCheck
Concerns::PipelineTimingCheck::MAX_PIPELINE_SECONDS
Constants inherited from ReferenceFilter
ReferenceFilter::REFERENCE_TYPE_ATTRIBUTE, ReferenceFilter::REFERENCE_TYPE_DATA_ATTRIBUTE_NAME
Constants included from Concerns::TextReplacer
Concerns::TextReplacer::REFERENCE_PLACEHOLDER, Concerns::TextReplacer::REFERENCE_PLACEHOLDER_PATTERN
Instance Method Summary collapse
- #object_link_title(object, matches) ⇒ Object
- #object_sym ⇒ Object
- #parent_records(parent, ids) ⇒ Object
- #url_for_object(feature_flag, project) ⇒ Object
Methods inherited from IssuableReferenceFilter
#find_object, #record_identifier
Methods inherited from AbstractReferenceFilter
#call, #data_attributes_for, #find_object, #find_object_cached, #find_object_from_link, #find_object_from_link_cached, #from_ref_cached, #identifier, #initialize, #object_link_content_html, #object_link_content_html_extras, #object_link_filter, #parent, #parent_type, #parse_symbol, #record_identifier, #references_in, #symbol_from_match_data, #url_for_object_cached, #wrap_link
Methods included from CrossProjectReference
Methods included from Concerns::TimeoutFilterHandler
Methods included from Concerns::PipelineTimingCheck
#call, #exceeded_pipeline_max?
Methods inherited from ReferenceFilter
call, #call, #call_and_update_nodes, #each_node, #group, #initialize, #nodes, #nodes?, #object_class, #project, #references_in, #requires_unescaping?
Methods included from Concerns::TextReplacer
#replace_references_in_text_with_html
Methods included from Concerns::HtmlWriter
Methods included from Concerns::OutputSafety
Methods included from RequestStoreReferenceCache
#cached_call, #get_or_set_cache
Constructor Details
This class inherits a constructor from Banzai::Filter::References::AbstractReferenceFilter
Instance Method Details
#object_link_title(object, matches) ⇒ Object
28 29 30 |
# File 'lib/banzai/filter/references/feature_flag_reference_filter.rb', line 28 def object_link_title(object, matches) object.name end |
#object_sym ⇒ Object
10 11 12 |
# File 'lib/banzai/filter/references/feature_flag_reference_filter.rb', line 10 def object_sym :feature_flag end |
#parent_records(parent, ids) ⇒ Object
14 15 16 17 18 |
# File 'lib/banzai/filter/references/feature_flag_reference_filter.rb', line 14 def parent_records(parent, ids) return Operations::FeatureFlag.none unless parent.is_a?(Project) parent.operations_feature_flags.iid_in(ids.to_a) end |
#url_for_object(feature_flag, project) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/banzai/filter/references/feature_flag_reference_filter.rb', line 20 def url_for_object(feature_flag, project) ::Gitlab::Routing.url_helpers.edit_project_feature_flag_url( project, feature_flag.iid, only_path: context[:only_path] ) end |