SilverWare\FAQs\Pages\FAQCategory
An extension of the page class for an FAQ category.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class FAQCategory
extends Page
implements
ListSource
{
- // members
- private static string $singular_name = 'FAQ Category';
- private static string $plural_name = 'FAQ Categories';
- private static string $description = 'A category within an FAQ page which holds a series of FAQs';
- private static string $icon = 'silverware/faqs: admin/client/dist/images/icons/FAQCategory.png';
- private static string $table_name = 'SilverWare_FAQCategory';
- private static string $default_child = FAQ::class;
- private static boolean $can_be_root = false;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- // methods
- public DataList getFAQs()
- public boolean hasFAQs()
- public DataList getListItems()
- public string getHTMLID()
- public boolean isFooterShown()
- public string getTopIcon()
- public string getTopLabel()
- public string getNoDataMessage()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Members
private
- $allowed_children
—
SilverWare\FAQs\Pages\array|string
Defines the allowed children for this object. - $can_be_root
—
boolean
Determines whether this object can exist at the root level. - $default_child
—
string
Defines the default child class for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $icon
—
string
Icon file for this object. - $plural_name
—
string
Human-readable plural name. - $singular_name
—
string
Human-readable singular name. - $table_name
—
string
Defines the table name to use for this object.
Methods
public
- getFAQs() — Answers a list of FAQs within the category.
- getHTMLID() — Answers a unique ID for the HTML template.
- getListItems() — Answers a list of FAQs within the receiver.
- getNoDataMessage() — Answers a message string to be shown when no data is available.
- getTopIcon() — Answers the icon to use for top buttons.
- getTopLabel() — Answers the label to use for top buttons.
- hasFAQs() — Answers true if the receiver has at least one FAQ.