SilverWare\Blog\Pages\Blog
An extension of the page class for a blog.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class Blog
extends Page
implements
ListSource,TagSource
{
- // members
- private static string $singular_name = 'Blog';
- private static string $plural_name = 'Blogs';
- private static string $description = 'Holds a series of blog posts organised into categories';
- private static string $icon = 'silverware/blog: admin/client/dist/images/icons/Blog.png';
- private static string $table_name = 'SilverWare_Blog';
- private static string $default_child = BlogCategory::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 getPosts()
- public DataList getFeedPosts()
- public DataList getListItems()
- public ArrayList getTags()
- public string getAuthorLink()
- public string getArchiveLink()
- public array getValidYears()
Hierarchy
Extends
- Page
Uses
- SilverWare\Lists\ListAlert
- SilverWare\Lists\ListFilter
Implements
- SilverWare\Lists\ListSource
- SilverWare\Tags\TagSource
Members
private
- $allowed_children
—
SilverWare\Blog\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.
- getArchiveLink() — Answers an archive link for the given year and optional month.
- getAuthorLink() — Answers a link for the given author.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getFeedPosts() — Answers a list of posts within the blog for the RSS feed.
- getListItems() — Answers a list of posts within the receiver.
- getPosts() — Answers a list of posts within the blog.
- getTags() — Answers a list of tags for the posts within the receiver.
- getValidYears() — Answers an array of valid years for posts within the blog.
- populateDefaults() — Populates the default values for the fields of the receiver.