SilverStripe\Blog\Model\Blog
Blog Holder
Synopsis
class Blog
extends Page
implements
PermissionProvider
{
- // constants
- const MANAGE_USERS = 'BLOG_MANAGE_USERS';
- // members
- private static boolean $grant_user_access = true;
- private static string $grant_user_permission = 'CMS_ACCESS_CMSMain';
- private static string $grant_user_group = 'blog-users';
- private static string $table_name = 'Blog';
- private static array $db = ;
- private static array $has_many = ;
- private static array $many_many = ;
- private static array $allowed_children = ;
- private static array $extensions = ;
- private static array $defaults = ;
- private static string $description = 'Adds a blog to your website.';
- private static string $icon_class = 'font-icon-p-posts';
- // methods
- public void getCMSFields()
- protected void addCMSRequirements()
- public void canEdit()
- protected null|Member getMember()
- public bool isEditor()
- protected bool isMemberOf()
- public null|string RoleOf()
- public bool isWriter()
- public bool isContributor()
- public void canAddChildren()
- public void getSettingsFields()
- protected SS_List getCandidateUsers()
- public bool canEditEditors()
- public boolean canEditWriters()
- public boolean canEditContributors()
- public DataList getArchivedBlogPosts()
- public DataList getBlogPosts()
- public string ProfileLink()
- public string getLumberjackTitle()
- public GridFieldConfig getLumberjackGridFieldConfig()
- public void providePermissions()
- protected void onBeforeWrite()
- protected void assignGroup()
- protected Group getUserGroup()
Hierarchy
Extends
- Page
Implements
- SilverStripe\Security\PermissionProvider
Constants
Name | Value |
---|---|
MANAGE_USERS | 'BLOG_MANAGE_USERS' |
Members
private
- $allowed_children — array
- $db — array
- $defaults
—
array
The ProvideComments db column is defined in the silverstripe/comments module - $description — string
- $extensions — array
- $grant_user_access
—
boolean
If true, users assigned as editor, writer, or contributor will be automatically granted CMS_ACCESS_CMSMain permission. If false, only users with this permission already may be assigned. - $grant_user_group
—
string
Group code to assign newly granted users to. - $grant_user_permission
—
string
Permission to either require, or grant to users assigned to work on this blog. - $has_many — array
- $icon_class
- $many_many — array
- $table_name
—
string
{@inheritDoc}
Methods
protected
- addCMSRequirements() — Adds CMS related css and js overrides
- assignGroup() — Assign users as necessary to the blog group.
- getCandidateUsers() — Gets the list of user candidates to be assigned to assist with this blog.
- getMember()
- getUserGroup() — Gets or creates the group used to assign CMS access.
- isMemberOf() — Determine if the given member belongs to the given relation.
- onBeforeWrite() — {@inheritdoc}
public
- ProfileLink() — Get a link to a Member profile.
- RoleOf() — Determine the role of the given member.
- canAddChildren() — {@inheritdoc}
- canEdit() — {@inheritdoc}
- canEditContributors() — Determines if this user can edit the contributors list.
- canEditEditors() — Determine if this user can edit the editors list.
- canEditWriters() — Determine if this user can edit writers list.
- getArchivedBlogPosts() — Returns BlogPosts for a given date period.
- getBlogPosts() — Return blog posts.
- getCMSFields() — {@inheritdoc}
- getLumberjackGridFieldConfig() — This overwrites lumberjacks default gridfield config.
- getLumberjackTitle() — This sets the title for our gridfield.
- getSettingsFields() — {@inheritdoc}
- isContributor() — Check if this member is a contributor of the blog.
- isEditor() — Check if this member is an editor of the blog.
- isWriter() — Check if this member is a writer of the blog.
- providePermissions() — {@inheritdoc}