\DataPage
- Author: Donatas Navidonskis <donatas@navidonskis.com>
Synopsis
class DataPage
extends DataObject
implements
CMSPreviewable,PermissionProvider
{
- // members
- private static array $db = ;
- private static array $defaults = ;
- private static array $indexes = ;
- private static array $has_one = ;
- private static array $many_many = ;
- private static array $field_labels = ;
- private static string $upload_directory = 'Uploads/DataPages';
- private static integer $limit_word_count = 20;
- // methods
- public string singular_name()
- public string plural_name()
- public array summaryFields()
- public FieldList getCMSFields()
- public string generateURLSegment()
- public string getURLPrefix()
- public string Link()
- public string|false CMSEditLink()
- protected void onBeforeWrite()
- public bool validURLSegment()
- public array fieldLabels()
- public static static|false getByUrlSegment()
- public string MetaTags()
- public Image|false getMetaImage()
- public string getSummary()
- public bool canViewParent()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void canCreate()
- public void canPublish()
- public void providePermissions()
- protected array getMappedGroups()
Hierarchy
Extends
- DataObject
Implements
- CMSPreviewable
- PermissionProvider
Members
private
- $db — array
- $defaults — array
- $field_labels — array
- $has_one — array
- $indexes — array
- $limit_word_count
—
int
Limit content words when collecting meta tags - $many_many — array
- $upload_directory — string
Methods
protected
public
- CMSEditLink() — Set your cms edit link by overriding this method.
- Link() — Return the link for this DataPage object, with the {@link DataPage::getURLPrefix()} included.
- MetaTags()
- canCreate()
- canDelete()
- canEdit()
- canPublish()
- canView()
- canViewParent() — Set a page or parent object and override this method to be display for users were permissions are required.
- fieldLabels()
- generateURLSegment()
- getByUrlSegment()
- getCMSFields()
- getMetaImage() — Get meta picture. If you have some other image for your object, override this method to return one. Crop images which are greater than 1024px, for the performance and the quality. Facebook are happy with that quality images.
- getSummary() — Get description for meta tags. First checking if MetaDescription field are filled, otherwise checking the Content field and cutting by limiting word count.
- getURLPrefix()
- plural_name() — Get the user friendly plural name of this DataObject
- providePermissions()
- singular_name() — Get the user friendly singular name of this DataObject.
- summaryFields()
- validURLSegment()