\FAQ
DataObject for a single FAQ related to the FAQ search module.
Provides db fields for a question and an answer.
Synopsis
class FAQ
extends DataObject
{
- // members
- private static array $db = ;
- private static array $summary_fields = ;
- private static array $has_one = ;
- private static string $question_boost = '3';
- private static string $answer_boost = '1';
- private static string $keywords_boost = '4';
- private static string $taxonomy_name = 'FAQ Categories';
- // methods
- public FieldList getCMSFields()
- public RequiredFields getCMSValidator()
- public boolean canView()
- public string getLink()
- public static ArrayList getAllCategories()
- public static null|TaxonomyTerm getRootCategory()
Hierarchy
Extends
- DataObject
Members
private
- $answer_boost
—
string
Search boost for answer - $db
- $has_one
- $keywords_boost
—
string
Search boost for keywords - $question_boost
—
string
Search boost for questions. - $summary_fields
- $taxonomy_name
—
string
Name of the taxonomy to use for categories
Methods
public
- canView() — Filters items based on member permissions or other criteria, such as if a state is generally available for the current record.
- getAllCategories() — Gets all nested categories for FAQs
- getCMSFields() — Add fields to manage FAQs.
- getCMSValidator() — Set required fields for model form submission.
- getLink() — Gets a link to the view page for each FAQ
- getRootCategory() — Gets the root category for the FAQs If it doesn't find it it creates it