\Block
A page content-block.
This is the base-class for all blocks.
Subclass this to create custom blocks.
- Author: bummzack
Synopsis
class Block
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $extensions = ;
- private static array $summary_fields = ;
- private static string $default_sort = 'SortOrder';
- // methods
- public void getCMSFields()
- public string PublishedStatus()
- public boolean IsPublished()
- public void canCreate()
- public string CSSClass()
- public HTMLText HTML()
- public string FullTitle()
- public string getCMSTitle()
- protected bool isSortingChanged()
- protected void onBeforeWrite()
Hierarchy
Extends
- DataObject
Members
private
- $db
- $default_sort
- $extensions
- $has_one
- $summary_fields
Methods
protected
- isSortingChanged() — Whether or not sorting of this block has changed.
- onBeforeWrite()
public
- CSSClass() — Class name to use in CSS
- FullTitle() — Get the full title of this block, including title of the parent (eg. the Page it belongs to)
- HTML() — Render this block to HTML
- IsPublished() — Whether or not this block has been published
- PublishedStatus() — Get the current published status.
- canCreate() — Prevent creation of non-specific Blocks
- getCMSFields()
- getCMSTitle() — Get the title to show in the CMS