SilverWare\Staff\Pages\StaffCategory
An extension of the page class for a staff category.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class StaffCategory
extends Page
implements
ListSource
{
- // constants
- const SUMMARY_PROFILE = 'Content';
- const SUMMARY_SUMMARY = 'SummaryMeta';
- const SUMMARY_EDUCATION = 'Education';
- // members
- private static string $singular_name = 'Staff Category';
- private static string $plural_name = 'Staff Categories';
- private static string $description = 'A category within a staff page which holds a series of members';
- private static string $icon = 'silverware/staff: admin/client/dist/images/icons/StaffCategory.png';
- private static string $table_name = 'SilverWare_StaffCategory';
- private static string $default_child = StaffMember::class;
- private static boolean $can_be_root = false;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public DataList getMembers()
- public boolean hasMembers()
- public DataList getListItems()
- public boolean getContentShown()
- public array getMemberSummaryOptions()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Constants
Name | Value |
---|---|
SUMMARY_PROFILE | 'Content' |
SUMMARY_SUMMARY | 'SummaryMeta' |
SUMMARY_EDUCATION | 'Education' |
Members
private
- $allowed_children
—
SilverWare\Staff\Pages\array|string
Defines the allowed children for this object. - $can_be_root
—
boolean
Determines whether this object can exist at the root level. - $db
—
array
Maps field names to field types for this object. - $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. - $extensions
—
array
Defines the extension classes to apply to 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
- fieldLabels() — Answers the labels for the fields of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getContentShown() — Answers true if the content of the category is to be shown on the staff page.
- getListItems() — Answers a list of members within the receiver.
- getMemberSummaryOptions() — Answers an array of options for the member summary field.
- getMembers() — Answers a list of members within the staff category.
- hasMembers() — Answers true if the receiver has at least one member.