SilverCart\ORM\DataObjectExtension
Extension for every DataObject.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class DataObjectExtension
extends DataExtension
{
- // methods
- public void onBeforeVersionedPublish()
- public bool IsRedirectedChild()
- public string getAdminQuickPreview()
- public array toRawMap()
- public string ClassNameCSS()
- public boolean fieldValueIsChanged()
- public boolean moneyFieldIsChanged()
- public boolean hasOneRelationIsChanged()
- public static FieldList getCMSFields()
- public static FieldList scaffoldFormFields()
- public array scaffoldFieldLabels()
Hierarchy
Extends
- SilverStripe\ORM\DataExtension
Methods
public
- ClassNameCSS() — Returns the ClassName to use as a CSS class.
- IsRedirectedChild() — Checks whether the current visited page is a child of the context RedirectionPage.
- fieldValueIsChanged() — Checks whether the given field is changed.
- getAdminQuickPreview() — Returns a quick preview to use in a related models admin form
- getCMSFields() — Clone of DataObject::getCMSFields() with some additional SilverCart related features.
- hasOneRelationIsChanged() — Checks whether the given has one relation is changed.
- moneyFieldIsChanged() — Checks whether the money field with the given fieldname is changed.
- onBeforeVersionedPublish() — Handles UseAsRootForMainNavigation property (can only be set for a single page).
- scaffoldFieldLabels() — Scaffolds the field labels by using a simple pattern.
- scaffoldFormFields() — Scaffold a simple edit form for all properties on this dataobject, based on default {@link FormField} mapping in {@link DBField::scaffoldFormField()}.
- toRawMap() — Returns the record as a array map with non escaped values