SilverWare\Blog\Pages\BlogPost
An extension of the page class for a blog post.
- Author: Colin Tucker <colin@praxis.net.au>
- Copyright: 2017 Praxis Interactive
- License: https://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
Synopsis
class BlogPost
extends Page
{
- // members
- private static string $singular_name = 'Blog Post';
- private static string $plural_name = 'Blog Posts';
- private static string $description = 'An individual post within a blog category';
- private static string $icon = 'silverware/blog: admin/client/dist/images/icons/BlogPost.png';
- private static string $table_name = 'SilverWare_BlogPost';
- private static string $default_sort = '"Date" DESC';
- private static boolean $can_be_root = false;
- private static array $db = ;
- private static array $many_many = ;
- private static array $defaults = ;
- private static array $casting = ;
- private static array|string $allowed_children = 'none';
- private static array $extensions = ;
- private static string $meta_date_format = 'd MMMM Y h:mma';
- private static string $meta_image_folder = 'Blog';
- private static array $list_item_details = ;
- private static array $detail_fields = ;
- private static boolean $detail_fields_inline = true;
- private static boolean $detail_fields_hide_header = true;
- private static boolean $detail_fields_hide_names = true;
- private static $author_group;
- // methods
- public FieldList getCMSFields()
- public array fieldLabels()
- public void populateDefaults()
- public DBDatetime getMetaDate()
- public BlogCategory getCategory()
- public string getCategoryLink()
- public string getTagsHTML()
- public string getAuthorsHTML()
- public boolean getShowCategoryInList()
- public boolean getShowTagsInList()
- public boolean getShowAuthorsInList()
- public boolean getShowAuthors()
- public Blog getBlog()
- public Group getAuthorGroup()
- public Map getAuthorOptions()
- public string getAuthorLink()
- public string getMetaDateFormat()
Hierarchy
Extends
- Page
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. - $casting
—
array
Maps field and method names to the class names of casting objects. - $db
—
array
Maps field names to field types for this object. - $default_sort
—
string
Defines the default sort field and order for this object. - $defaults
—
array
Defines the default values for the fields of this object. - $description
—
string
Description of this object. - $detail_fields
—
array
Defines the detail fields to show for the object. - $detail_fields_hide_header
—
boolean
Defines the setting for hiding the detail fields header. - $detail_fields_hide_names
—
boolean
Defines the setting for hiding the detail field names. - $detail_fields_inline
—
boolean
Defines the setting for showing the detail fields inline. - $extensions
—
array
Defines the extension classes to apply to this object. - $icon
—
string
Icon file for this object. - $list_item_details
—
array
Defines the list item details to show for this object. - $many_many
—
array
Defines the many-many associations for this object. - $meta_date_format
—
string
Defines the format for the meta date field. - $meta_image_folder
—
string
Defines the asset folder for uploaded meta images. - $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.
- getAuthorGroup() — Answers the security group used for blog authors.
- getAuthorLink() — Answers a link for the given author.
- getAuthorOptions() — Answers a map of options for the authors field.
- getAuthorsHTML() — Answers a string of HTML containing the authors for the blog post.
- getBlog() — Answers the parent blog of the receiver.
- getCMSFields() — Answers a list of field objects for the CMS interface.
- getCategory() — Answers the parent category of the receiver.
- getCategoryLink() — Answers a string of HTML containing a link to the parent category.
- getMetaDate() — Answers the meta date for the receiver.
- getMetaDateFormat() — Answers the format for the date of the post.
- getShowAuthors() — Answers true if the authors are to be shown in the post.
- getShowAuthorsInList() — Answers true if the authors are to be shown in the list.
- getShowCategoryInList() — Answers true if the category is to be shown in the list.
- getShowTagsInList() — Answers true if the tags are to be shown in the list.
- getTagsHTML() — Answers a string of HTML containing the tags for the blog post.
- populateDefaults() — Populates the default values for the fields of the receiver.