\ContentModule
Base class for modules
Synopsis
class ContentModule
extends DataObject
implements
PermissionProvider
{
- // members
- public Form $form;
- protected $_currentModuleField;
- protected static boolean $has_url = false;
- private static array $db = ;
- private static array $defaults = ;
- private static array $summary_fields = ;
- private static array $casting = ;
- private static array $extensions = ;
- private static array $exclude_modules = ;
- private static bool $fix_tab_heights = false;
- private static array $_loaded_modules = ;
- protected static array $_currentModuleFields = ;
- // methods
- public void getCMSFields()
- public an|FieldList getCMSActions()
- public void onBeforeWrite()
- public $this copy()
- public FieldList EditFields()
- public void renameFields()
- public void EditActions()
- public void EditForm()
- public void forTemplate()
- public static array content_module_types()
- public boolean isPublished()
- public boolean isNew()
- public boolean getIsDeletedFromStage()
- public void getExistsOnLive()
- public boolean getIsModifiedOnStage()
- public boolean getIsAddedToStage()
- public boolean canView()
- public boolean canViewStage()
- public boolean canDelete()
- public boolean canCreate()
- public boolean canEdit()
- public boolean canPublish()
- public void canDeleteFromLive()
- public void getSiteConfig()
- public string doPublish()
- public string doSave()
- public string doUnpublish()
- public string doDelete()
- public string doUnlink()
- public void doRollback()
- public mixed Link()
- public void setIsActive()
- public void getIsActive()
- public void providePermissions()
- public string doStartworkflow()
- public String doUpdateworkflow()
- public void Type()
- public string AbsoluteLink()
- public string RelativeLink()
- public void getAbsoluteLiveLink()
- public String CMSEditLink()
- public void CurrentPage()
- public void setCurrentModuleField()
- public void getCurrentModuleField()
- public void getFixTabHeights()
- public void getIsEditorMode()
- public void injectVisualEditor()
- public array getStatusFlags()
- public void getStatusFlagsObj()
- public void getStatusFlagsKeys()
Hierarchy
Extends
- DataObject
Implements
- PermissionProvider
Tasks
Line | Task |
---|---|
581+ | Implement in CMS UI. |
927+ | better way of handling links |
998+ | handle this better, make use of workflow functions |
1022+ | handle this better, make use of workflow functions |
Members
private
- $_loaded_modules
- $casting
- $db
- $defaults
- $exclude_modules
- $extensions
- $fix_tab_heights
—
bool
Sets tabs to all the same height - $summary_fields
protected
- $_currentModuleField
- $_currentModuleFields
- $has_url
public
- $form
—
Form
Used in CMS for setting form on variables which require it
Methods
public
- AbsoluteLink() — Get the absolute URL for this page, including protocol and host.
- CMSEditLink()
- CurrentPage()
- EditActions()
- EditFields() — Gets the list of fields for editing the module, and modifies the Name to make it suitable to work with ContentModuleField
- EditForm()
- Link()
- RelativeLink() — Return the link for this {@link SiteTree} object relative to the SilverStripe root.
- Type()
- canCreate() — This function should return true if the current user can create new pages of this class. It can be overloaded to customise the security model for an application.
- canDelete() — This function should return true if the current user can delete this page. It can be overloaded to customise the security model for an application.
- canDeleteFromLive()
- canEdit() — This function should return true if the current user can edit this page. It can be overloaded to customise the security model for an application.
- canPublish() — This function should return true if the current user can publish this page. It can be overloaded to customise the security model for an application.
- canView() — This function should return true if the current user can view this page. It can be overloaded to customise the security model for an application.
- canViewStage() — Determines permissions for a specific stage (see {@link Versioned}).
- content_module_types() — Gets modules based on called class, excludes base class (calling class), any which have been specifically excluded, and any implementing HiddenClass
- copy() — Makes a copy of the ContentModule
- doDelete() — CMS action for deleting draft version of ContentModule, returns a message
- doPublish() — CMS action for publishing ContentModule, returns a message
- doRollback()
- doSave() — CMS action for saving draft version of ContentModule, returns a message
- doStartworkflow()
- doUnlink() — Unlink a module from a page, pass through an array in the format:
- doUnpublish() — CMS action for unpublishing ContentModule, returns a message
- doUpdateworkflow() — Update a workflow based on user input.
- forTemplate()
- getAbsoluteLiveLink() — Get the absolute URL for this page on the Live site.
- getCMSActions()
- getCMSFields()
- getCurrentModuleField()
- getExistsOnLive() — Return true if this page exists on the live site
- getFixTabHeights()
- getIsActive()
- getIsAddedToStage() — Compares current draft with live version, and returns true if no live version exists, meaning the page was never published.
- getIsDeletedFromStage() — Compares current draft with live version, and returns TRUE if no draft version of this page exists, but the page is still published (after triggering "Delete from draft site" in the CMS).
- getIsEditorMode()
- getIsModifiedOnStage() — Compares current draft with live version, and returns TRUE if these versions differ, meaning there have been unpublished changes to the draft site.
- getSiteConfig() — Stub method to get the site config, provided so it's easy to override
- getStatusFlags() — A flag provides the user with additional data about the current page status, for example a "removed from draft" status. Each page can have more than one status flag. Returns a map of a unique key to a (localized) title for the flag. The unique key can be reused as a CSS class. Use the 'updateStatusFlags' extension point to customize the flags.
- getStatusFlagsKeys()
- getStatusFlagsObj()
- injectVisualEditor()
- isNew() — Check if this content module is new - that is, if it has yet to have been written to the database.
- isPublished() — Check if this content module has been published.
- onBeforeWrite()
- providePermissions()
- renameFields()
- setCurrentModuleField()
- setIsActive()