\Block
Class Block
Basic block class. This class should be extended for usage in the cms.
Synopsis
class Block
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $summary_fields = ;
- private static string $default_sort = "Block.SortOrder ASC";
- // methods
- public void __construct()
- public FieldList getCMSFields()
- public string LeadInText()
- public string ContentText()
- public Image Thumbnail()
- public bool HasLink()
- public bool LinkIsExternal()
- public string LinkURL()
- public string LinkTitle()
- public string Link()
- public string LinkDetails()
Hierarchy
Extends
- DataObject
Members
private
- $db
—
array
Fields - $default_sort
—
string
Default sort order - $has_one
—
array
Relationships - $summary_fields
—
array
Summary fields for GridField
Methods
public
- __construct() — Constructor
- ContentText() — Text-only Content
- HasLink() — Check if this block has a valid link
- LeadInText() — Text-only Lead In
- Link() — Get compiled link
- LinkDetails() — Get link details
- LinkIsExternal() — Check if link is external
- LinkTitle() — Get link title
- LinkURL() — Get link url
- Thumbnail() — Get thumbnail for list in admin
- getCMSFields() — Get CMS fields