Broarm\PageSlices\PageSlice
Class PageSlice
Synopsis
class PageSlice
extends DataObject
{
- // members
- private static string $table_name = 'PageSlice';
- private static array $db = ;
- private static string $default_sort = 'Sort ASC';
- private static array $has_one = ;
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- private static array $translate = ;
- private static string $slice_image = 'bramdeleeuw/silverstripe-pageslices:images/PageSlice.png';
- protected PageSliceController $controller;
- // methods
- public FieldList getCMSFields()
- public void onBeforeWrite()
- public void onAfterDuplicate()
- public string getSliceType()
- public string getCSSName()
- private void createSliceID()
- public string getSliceImage()
- public PageSliceController getController()
- public array fieldLabels()
- public ValidationResult validate()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void canCreate()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db
- $default_sort
- $has_one
- $searchable_fields
- $slice_image
- $summary_fields
- $table_name
- $translate
protected
- $controller — Broarm\PageSlices\PageSliceController
Methods
private
- createSliceID() — Create a readable ID based on the slice title
public
- canCreate()
- canDelete()
- canEdit()
- canView()
- fieldLabels() — Register field labels
- getCMSFields()
- getCSSName() — Return a nice css name
- getController()
- getSliceImage() — Return the path to the section image
- getSliceType() — Return the translated ClassName
- onAfterDuplicate() — If this slice holds has_many content on duplicate copy the content over
- onBeforeWrite()
- validate() — Validate the slice type