\PageModule
Class PageModule.
Synopsis
class PageModule
extends DataObject
{
- // members
- public static string $label = 'Page module';
- public static string $description = 'The base class for all module types. You should override this description.';
- public static string $category = 'General';
- private static array $db = ;
- private static array $has_one = ;
- private static string $default_sort = 'Order';
- private static array $extensions = ;
- private static array $summary_fields = ;
- private static array $searchable_fields = ;
- // methods
- public RequiredFields getCMSValidator()
- public FieldList getCMSFields()
- public string Content()
- public string Link()
- public void onBeforeWrite()
- protected void onAfterDelete()
- public string getSearchBody()
- public string getSummaryContent()
Hierarchy
Extends
- DataObject
Members
private
- $db — array
- $default_sort — string
- $extensions — array
- $has_one — array
- $searchable_fields — array
- $summary_fields — array
public
- $category
- $description
- $label
Methods
protected
- onAfterDelete() — Remove the live stage on delete, otherwise content is orphaned in live and cannot be removed.
public
- Content()
- Link() — Gets the page link for the parent page.
- getCMSFields()
- getCMSValidator()
- getSearchBody() — Hook to supply module text content to the parent page element for indexing in searches.
- getSummaryContent()
- onBeforeWrite() — Where the magic happens. Convert the module from the default base class to the chosen type.