SilverWare\Blog\Pages\BlogCategory
An extension of the page class for a blog 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 BlogCategory
extends Page
implements
ListSource,TagSource
{
- // members
- private static string $singular_name = 'Blog Category';
- private static string $plural_name = 'Blog Categories';
- private static string $description = 'A category within a blog which holds a series of posts';
- private static string $icon = 'silverware/blog: admin/client/dist/images/icons/BlogCategory.png';
- private static string $table_name = 'SilverWare_BlogCategory';
- private static string $default_child = BlogPost::class;
- private static boolean $can_be_root = false;
- private static array $defaults = ;
- private static array|string $allowed_children = ;
- private static array $extensions = ;
- // methods
- public Blog getBlog()
- public DataList getPosts()
- public DataList getListItems()
- public ArrayList getTags()
- public string getAuthorLink()
- public string getDateFormat()
Hierarchy
Extends
- Page
Implements
- SilverWare\Lists\ListSource
- SilverWare\Tags\TagSource
Members
private
- $allowed_children
—
SilverWare\Blog\Pages\array|string
Defines the allowed children for this object. - $can_be_root
—
boolean
Determines whether this object can exist at the root level. - $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
- getAuthorLink() — Answers a link for the given author.
- getBlog() — Answers the parent blog of the receiver.
- getDateFormat() — Answers the date format defined for the blog.
- getListItems() — Answers a list of posts within the receiver.
- getPosts() — Answers a list of posts within the blog category.
- getTags() — Answers a list of tags for the posts within the receiver.