SilverWare\News\Pages\NewsArchive
An extension of the page class for a news archive.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class NewsArchive
extends Page
implements
ListSource
{
- // members
- private static string $singular_name = 'News Archive';
- private static string $plural_name = 'News Archives';
- private static string $description = 'Holds a series of news articles organised into categories';
- private static string $icon = 'silverware/news: admin/client/dist/images/icons/NewsArchive.png';
- private static string $table_name = 'SilverWare_NewsArchive';
- private static string $default_child = NewsCategory::class;
- private static array $db = ;
- private static array $defaults = ;
- private static array $list_view_defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public void populateDefaults()
- public DataList getArticles()
- public DataList getFeedArticles()
- public DataList getListItems()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
Members
private
- $allowed_children
—
SilverWare\News\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.
- getArticles() — Answers a list of articles within the archive.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getFeedArticles() — Answers a list of articles within the archive for the RSS feed.
- getListItems() — Answers a list of articles within the receiver.
- populateDefaults() — Populates the default values for the fields of the receiver.