BlogPost
class BlogPost extends Page (View source)
An individual blog post.
Properties
string | $PublishDate | |||
string | $AuthorNames | |||
string | $Summary | |||
int | $ParentID | |||
int | $FeaturedImageID |
Methods
Gets the list of author candidates to be assigned as authors of this blog post.
Determine whether user can create new categories.
Returns a monthly archive link for the current blog post.
Sets the label for BlogPost.Title to 'Post Title' (Rather than 'Page name').
Provides a rough estimate of how long this post will take to read based on wikipedias answer to "How fast can a human read" of 200wpm. Source https://en.wikipedia.org/wiki/Speed_reading
Details
null|string
RoleOf(null|int|Member $member = null)
Determine the role of the given member.
Call be called via template to determine the current user.
bool
isAuthor(null|Member $member = null)
Determine if the given member is an author of this post.
getCMSFields()
{@inheritdoc}
SS_List
getCandidateAuthors()
Gets the list of author candidates to be assigned as authors of this blog post.
bool
canEditAuthors(null|int|Member $member = null)
Determine if this user can edit the authors list.
bool
canCreateCategories(null|int|Member $member = null)
Determine whether user can create new categories.
bool
canCreateTags(null|int|Member $member = null)
Determine whether user can create new tags.
onBeforePublish()
{@inheritdoc}
Update the PublishDate to now if the BlogPost would otherwise be published without a date.
onAfterWrite()
{@inheritdoc}
Sets blog relationship on all categories and tags assigned to this post.
canView($member = null)
{@inheritdoc}
canPublish($member = null)
{@inheritdoc}
canEdit($member = null)
{@inheritdoc}
string
Excerpt(int $wordsToDisplay = 30)
Returns the post excerpt.
string
getMonthlyArchiveLink(string $type = 'day')
Returns a monthly archive link for the current blog post.
string
getYearlyArchiveLink()
Returns a yearly archive link for the current blog post.
ArrayList
getCredits()
Resolves static and dynamic authors linked to this post.
protected ArrayList
getDynamicCredits()
Resolves dynamic authors linked to this post.
protected ArrayList
getStaticCredits()
Resolves static authors linked to this post.
bool
getProfilesDisabled()
Checks to see if User Profiles has been disabled via config
array
fieldLabels(bool $includeRelations = true)
Sets the label for BlogPost.Title to 'Post Title' (Rather than 'Page name').
string|null
getDate()
Proxy method for displaying the publish date in rss feeds.
string
MinutesToRead(null|int $wpm = null)
Provides a rough estimate of how long this post will take to read based on wikipedias answer to "How fast can a human read" of 200wpm. Source https://en.wikipedia.org/wiki/Speed_reading
protected
onBeforeWrite()
{@inheritdoc}
ManyManyList
Categories()
No description
ManyManyList
Tags()
No description
ManyManyList
Authors()
No description
Blog
Parent()
No description
Image
FeaturedImage()
No description