SilverStripe\Blog\Model\BlogCategory
A blog category for generalising blog posts.
Synopsis
class BlogCategory
extends DataObject
implements
CategorisationObject
{
- // constants
- const DUPLICATE_EXCEPTION = 'DUPLICATE';
- // members
- private static string $table_name = 'BlogCategory';
- private static array $db = ;
- private static array $has_one = ;
- private static array $belongs_many_many = ;
- // methods
- protected void getListUrlSegment()
- protected void getDuplicateError()
- // Inherited methods from BlogObject
- public DataList BlogPosts()
- public void getCMSFields()
- public ValidationResult validate()
- public string getLink()
- public bool canView()
- public void canCreate()
- public bool canDelete()
- public bool canEdit()
- protected void onBeforeWrite()
- public string generateURLSegment()
- protected DataList getDuplicatesByField()
- protected abstract string getListUrlSegment()
- protected abstract string getDuplicateError()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Uses
Implements
Constants
Name | Value |
---|---|
DUPLICATE_EXCEPTION | 'DUPLICATE' |
Members
private
- $belongs_many_many — array
- $db — array
- $has_one — array
- $table_name
—
string
{@inheritDoc}
Methods
protected
- getDuplicateError() — {@inheritdoc}
- getListUrlSegment() — {@inheritdoc}
Inherited from SilverStripe\Blog\Model\BlogObject
protected
- getDuplicateError() — Returns an error message for this object when it tries to write a duplicate.
- getDuplicatesByField() — Looks for objects o the same type and the same value by the given Field
- getListUrlSegment() — This returns the url segment for the listing page.
- onBeforeWrite() — {@inheritdoc}
public
- BlogPosts()
- canCreate() — {@inheritdoc}
- canDelete() — Inherits from the parent blog or can be overwritten using a DataExtension.
- canEdit() — Inherits from the parent blog or can be overwritten using a DataExtension.
- canView() — Inherits from the parent blog or can be overwritten using a DataExtension.
- generateURLSegment() — Generates a unique URLSegment from the title.
- getCMSFields() — {@inheritdoc}
- getLink() — Returns a relative link to this category.
- validate() — {@inheritdoc}