SilverWare\Publications\Pages\PublicationArchive
An extension of the page class for a publication archive.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2018 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class PublicationArchive
extends Page
implements
ListSource
{
- // constants
- const SORT_ORDER = 'order';
- const SORT_TITLE = 'title';
- const SORT_DATE_ASC = 'date-asc';
- const SORT_DATE_DESC = 'date-desc';
- // members
- private static string $singular_name = 'Publication Archive';
- private static string $plural_name = 'Publication Archives';
- private static string $description = 'Holds a series of publications organised into categories';
- private static string $icon = 'silverware/publications: admin/client/dist/images/icons/PublicationArchive.png';
- private static string $table_name = 'SilverWare_PublicationArchive';
- private static string $default_child = PublicationCategory::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- private static array $list_view_defaults = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public DataList getPublications()
- public DataList getChildPublications()
- public DataList getListItems()
- public DataList getAllCategories()
- public ArrayList getNonEmptyCategories()
- public ArrayList getVisibleCategories()
- public BaseListComponent getChildPublicationList()
- public BaseListComponent getPublicationList()
- public string getNoDataMessage()
- public array getSortOrderOptions()
- public SS_List getSortedPublications()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Constants
Name | Value |
---|---|
SORT_ORDER | 'order' |
SORT_TITLE | 'title' |
SORT_DATE_ASC | 'date-asc' |
SORT_DATE_DESC | 'date-desc' |
Members
private
- $allowed_children
—
SilverWare\Publications\Pages\array|string
Defines the allowed children for this object. - $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. - $list_view_defaults
—
array
Defines the default values for the list view component. - $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.
- getAllCategories() — Answers all categories within the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getChildPublicationList() — Answers the child publication list component for the template.
- getChildPublications() — Answers a list of the immediate child publications of the archive.
- getListItems() — Answers a list of publications within the receiver.
- getNoDataMessage() — Answers a message string to be shown when no data is available.
- getNonEmptyCategories() — Answers all non-empty categories within the receiver.
- getPublicationList() — Answers the publication list component for the template.
- getPublications() — Answers a list of publications within the publication archive.
- getSortOrderOptions() — Answers an array of options for the sort order field.
- getSortedPublications() — Sorts the given list of publications.
- getVisibleCategories() — Answers all visible categories within the receiver.