Blog
class Blog extends Page implements PermissionProvider (View source)
Blog Holder
Constants
MANAGE_USERS |
Permission for user management. |
Properties
Methods
Determine if the given member belongs to the given relation.
Gets the list of user candidates to be assigned to assist with this blog.
Determines if this user can edit the contributors list.
Returns BlogPosts for a given date period.
This overwrites lumberjacks default gridfield config.
Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.
Details
getCMSFields()
{@inheritdoc}
protected
addCMSRequirements()
Adds CMS related css and js overrides
canEdit($member = null)
{@inheritdoc}
bool
isEditor(Member $member)
Check if this member is an editor of the blog.
protected bool
isMemberOf(Member $member, DataList $relation)
Determine if the given member belongs to the given relation.
null|string
RoleOf(int|Member $member)
Determine the role of the given member.
Call be called via template to determine the current user.
bool
isWriter(Member $member)
Check if this member is a writer of the blog.
bool
isContributor(Member $member)
Check if this member is a contributor of the blog.
canAddChildren($member = null)
{@inheritdoc}
getSettingsFields()
{@inheritdoc}
protected SS_List
getCandidateUsers()
Gets the list of user candidates to be assigned to assist with this blog.
bool
canEditEditors(int|Member $member = null)
Determine if this user can edit the editors list.
bool
canEditWriters(int|Member $member = null)
Determine if this user can edit writers list.
bool
canEditContributors(int|Member $member = null)
Determines if this user can edit the contributors list.
DataList
getArchivedBlogPosts(int $year, null|int $month = null, null|int $day = null)
Returns BlogPosts for a given date period.
DataList
getBlogPosts()
Return blog posts.
string
ProfileLink(string $urlSegment)
Get a link to a Member profile.
string
getLumberjackTitle()
This sets the title for our gridfield.
GridFieldConfig
getLumberjackGridFieldConfig()
This overwrites lumberjacks default gridfield config.
providePermissions()
Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.
array( 'VIEW_SITE' => 'View the site', );
protected
onBeforeWrite()
{@inheritdoc}
protected
assignGroup()
Assign users as necessary to the blog group.
protected Group
getUserGroup()
Gets or creates the group used to assign CMS access.
HasManyList
Tags()
List of tags in this blog
HasManyList
Categories()
List of categories in this blog
ManyManyList
Editors()
List of editors
ManyManyList
Writers()
List of writers
ManyManyList
Contributors()
List of contributors