class Blog extends Page implements PermissionProvider (View source)

Blog Holder

Constants

MANAGE_USERS

Permission for user management.

Properties

Methods

public
getCMSFields()

{@inheritdoc}

protected
addCMSRequirements()

Adds CMS related css and js overrides

public
canEdit($member = null)

{@inheritdoc}

protected
null|Member
getMember(null|int|Member $member = null)

No description

public
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.

public
null|string
RoleOf(int|Member $member)

Determine the role of the given member.

public
bool
isWriter(Member $member)

Check if this member is a writer of the blog.

public
bool
isContributor(Member $member)

Check if this member is a contributor of the blog.

public
canAddChildren($member = null)

{@inheritdoc}

public
getSettingsFields()

{@inheritdoc}

protected
getCandidateUsers()

Gets the list of user candidates to be assigned to assist with this blog.

public
bool
canEditEditors(int|Member $member = null)

Determine if this user can edit the editors list.

public
bool
canEditWriters(int|Member $member = null)

Determine if this user can edit writers list.

public
bool
canEditContributors(int|Member $member = null)

Determines if this user can edit the contributors list.

public
getArchivedBlogPosts(int $year, null|int $month = null, null|int $day = null)

Returns BlogPosts for a given date period.

public
getBlogPosts()

Return blog posts.

public
string
ProfileLink(string $urlSegment)

Get a link to a Member profile.

public
string
getLumberjackTitle()

This sets the title for our gridfield.

public
getLumberjackGridFieldConfig()

This overwrites lumberjacks default gridfield config.

public
providePermissions()

Return a map of permission codes to add to the dropdown shown in the Security section of the CMS.

protected
onBeforeWrite()

{@inheritdoc}

protected
assignGroup()

Assign users as necessary to the blog group.

protected
getUserGroup()

Gets or creates the group used to assign CMS access.

Tags()

List of tags in this blog

Categories()

List of categories in this blog

Editors()

List of editors

Writers()

List of writers

Contributors()

List of contributors

Details

getCMSFields()

{@inheritdoc}

protected addCMSRequirements()

Adds CMS related css and js overrides

canEdit($member = null)

{@inheritdoc}

Parameters

$member

protected null|Member getMember(null|int|Member $member = null)

No description

Parameters

null|int|Member $member

Return Value

null|Member

bool isEditor(Member $member)

Check if this member is an editor of the blog.

Parameters

Member $member

Return Value

bool

protected bool isMemberOf(Member $member, DataList $relation)

Determine if the given member belongs to the given relation.

Parameters

Member $member
DataList $relation

Return Value

bool

null|string RoleOf(int|Member $member)

Determine the role of the given member.

Call be called via template to determine the current user.

Parameters

int|Member $member

Return Value

null|string

Examples

"Hello $RoleOf($CurrentMember.ID)"

bool isWriter(Member $member)

Check if this member is a writer of the blog.

Parameters

Member $member

Return Value

bool

bool isContributor(Member $member)

Check if this member is a contributor of the blog.

Parameters

Member $member

Return Value

bool

canAddChildren($member = null)

{@inheritdoc}

Parameters

$member

getSettingsFields()

{@inheritdoc}

protected SS_List getCandidateUsers()

Gets the list of user candidates to be assigned to assist with this blog.

Return Value

SS_List

bool canEditEditors(int|Member $member = null)

Determine if this user can edit the editors list.

Parameters

int|Member $member

Return Value

bool

bool canEditWriters(int|Member $member = null)

Determine if this user can edit writers list.

Parameters

int|Member $member

Return Value

bool

bool canEditContributors(int|Member $member = null)

Determines if this user can edit the contributors list.

Parameters

int|Member $member

Return Value

bool

DataList getArchivedBlogPosts(int $year, null|int $month = null, null|int $day = null)

Returns BlogPosts for a given date period.

Parameters

int $year
null|int $month
null|int $day

Return Value

DataList

DataList getBlogPosts()

Return blog posts.

Return Value

DataList

of BlogPost objects

Get a link to a Member profile.

Parameters

string $urlSegment

Return Value

string

string getLumberjackTitle()

This sets the title for our gridfield.

Return Value

string

GridFieldConfig getLumberjackGridFieldConfig()

This overwrites lumberjacks default gridfield config.

Return Value

GridFieldConfig

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.

Return Value

Group

HasManyList Tags()

List of tags in this blog

Return Value

HasManyList

HasManyList Categories()

List of categories in this blog

Return Value

HasManyList

ManyManyList Editors()

List of editors

Return Value

ManyManyList

ManyManyList Writers()

List of writers

Return Value

ManyManyList

ManyManyList Contributors()

List of contributors

Return Value

ManyManyList