SilverWare\Publications\Pages\PublicationCategory
An extension of the page class for a publication 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 PublicationCategory
extends Page
implements
ListSource
{
- // members
- private static string $singular_name = 'Publication Category';
- private static string $plural_name = 'Publication Categories';
- private static string $description = 'A category within a publication archive which holds a series of publications';
- private static string $icon = 'silverware/publications: admin/client/dist/images/icons/PublicationCategory.png';
- private static string $table_name = 'SilverWare_PublicationCategory';
- private static string $default_child = Publication::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 PublicationArchive getArchive()
- public DataList getPublications()
- public boolean hasPublications()
- public DataList getListItems()
- public boolean getShowFileInfo()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Members
private
- $allowed_children
—
SilverWare\Publications\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.
- getArchive() — Answers the parent archive of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getListItems() — Answers a list of publications within the receiver.
- getPublications() — Answers the publications within the category.
- getShowFileInfo() — Answers true if the file information is to be shown in the template.
- hasPublications() — Answers true if the receiver has at least one publication.