CMSModuleContentType
extends ContentBase
in package
Class that module defined content types must extend.
Tags
Table of Contents
Properties
- $mItemOrder : mixed
- The item order of the content in his level Integer
- $mParentId : mixed
- The ID of the parent, 0 if none Integer
Methods
- __construct() : mixed
- Generic constructor. Runs the SetInitialValues fuction.
- AccessKey() : string
- Get the access key (for accessibility) for this page.
- Active() : bool
- Returns the Active state
- Alias() : string
- Returns the Alias
- Cachable() : bool
- Return whether this page is cachable.
- ChangeItemOrder() : mixed
- Move this content up, or down with respect to its peers.
- ChildCount() : int
- Returns number of immediate child content items of this content item.
- DefaultContent() : bool
- Returns if the page is the default.
- Delete() : mixed
- Delete the current content object from the database.
- FillParams() : mixed
- Function for the subclass to parse out data for it's parameters.
- FriendlyName() : string
- Returns a friendly name for this content type
- GetAdditionalEditorInput() : string
- A utility method to generate a <select> field for selecting additional editors.
- GetAdditionalEditorOptions() : array<string|int, mixed>
- A utility method to return all of the userid and group ids in a format that is suitable to be used in a select field.
- GetAdditionalEditors() : mixed
- Return a list of additional editors.
- GetCreationDate() : int
- Retrieve the creation date of this content object.
- GetEditableProperties() : array<string|int, mixed>
- Return a list of all the properties that may be edited by the current user when editing this content item in a content editor form.
- GetModifiedDate() : int
- Retrieve the date of the last modification of this content object.
- GetModuleInstance() : mixed
- Returns the instance of the module this content type belongs to
- GetProperties() : array<string|int, mixed>
- Get all of the properties for this content object. independent of whether the user is entitled to view them, or not.
- GetPropertyValue() : mixed
- Get the value for the named property.
- GetTabElements() : array<string|int, mixed>
- Get the elements for a specific tab.
- GetTabMessage() : string
- Get an optional message for each tab.
- GetTabNames() : array<string|int, mixed>
- Used from a page that allows content editing.
- GetURL() : string
- A function to get the internally generated URL for this content type.
- HandlesAlias() : bool
- Content object handles the alias
- HasChildren() : bool
- Method to indicate whether the current page has children.
- HasPreview() : bool
- Returns whether preview should be available for this content type
- HasProperty() : bool
- Test whether this content page has the named property.
- HasTemplate() : bool
- Indicates whether ths page type uses a template.
- HasUsableLink() : bool
- An abstract method that indicates that this content type is navigable and generates a useful URL.
- Hierarchy() : string
- Returns the Hierarchy of the current page.
- HierarchyPath() : string
- Returns the Hierarchy Path.
- Id() : mixed
- Returns the ID
- IdHierarchy() : string
- Returns the Id Hierarchy.
- IsCopyable() : bool
- An abstract method indicating whether the content type is copyable.
- IsDefaultPossible() : mixed
- Indicates whether this content type can be the default page for a CMSMS website.
- IsPermitted() : bool
- Indicates wether the current user is permitted to view this content page.
- IsSearchable() : bool
- Indicates whether this content type is searchable.
- IsSystemPage() : bool
- An abstract method to indicate whether this content type generates a system page.
- IsViewable() : bool
- Indicates whether this content type is viewable (i.e: can be rendered).
- ItemOrder() : int
- Returns the ItemOrder The ItemOrder is used to specify the order of this page amongst its peers
- Lang() : mixed
- Retrieve a language string from the module.
- LastModifiedBy() : int
- Return the integer id of the admin user that last modified this content item.
- LoadFromData() : mixed
- Load the content of the object from an array.
- MenuText() : string
- Returns the menu text for this content page.
- Metadata() : string
- Returns the Metadata
- ModuleName() : string
- A method for returning the module that the content type belongs to.
- Name() : string
- Returns the Name
- OldItemOrder() : int
- Returns the OldItemOrder.
- Owner() : int
- Returns the Owners user id
- ParentId() : int
- Returns the id of this pages parent.
- Properties() : array<string|int, mixed>
- Content page objects only directly store enough information to build a basic navigation from content objects.
- RequiresAlias() : bool
- Indicates whether this content type requires an alias.
- Save() : mixed
- Save or update the content.
- Secure() : bool
- Return whether this page should be accessed via a secure protocol.
- SetAccessKey() : mixed
- Set the access key (for accessibility) for this page
- SetActive() : mixed
- Sets this page as active
- SetAdditionalEditors() : mixed
- Set the list of additional editors.
- SetAlias() : mixed
- Set the page alias for this content page.
- SetCachable() : mixed
- Set whether this page is cachable
- SetDefaultContent() : mixed
- Sets if this page should be considered the default.
- SetLastModifiedBy() : mixed
- Set the last modified date for this item
- SetMenuText() : mixed
- Sets the menu text for this content page
- SetMetadata() : mixed
- Set the page metadata
- SetName() : mixed
- Set the the page name
- SetOwner() : mixed
- Set the page owner.
- SetParentId() : mixed
- Sets the parent of this page.
- SetPropertyValue() : mixed
- Set the value of a the named property.
- SetPropertyValueNoLoad() : mixed
- Set the value of a the named property.
- SetSecure() : mixed
- Set whether this page should be accessed via a secure protocol.
- SetShowInMenu() : mixed
- Sets whether this page should be (by default) shown in menus
- SetTabIndex() : mixed
- Set the page tabindex value
- SetTemplateId() : mixed
- Set the id of the template associated with this content page.
- SetTitleAttribute() : mixed
- Set the title attribute of the page
- SetURL() : mixed
- Set the page url (if any) associated with this content page.
- Show() : string
- Return the raw value for a content property.
- ShowAdditionalEditors() : string
- Provides an input element to display the list of additional editors.
- ShowInMenu() : bool
- Returns whether this content item should (by default) be shown in navigation menus.
- TabIndex() : int
- Return the page tabindex value
- TemplateId() : mixed
- Return the id of the template associated with this content page.
- TitleAttribute() : string
- Return the page title attribute
- ToData() : array<string|int, mixed>
- Convert the current object to an array.
- Type() : string
- Returns the Type
- URL() : string
- Return the page url (if any) associated with this content page.
- ValidateData() : mixed
- Test if the content object is valid.
- WantsChildren() : bool
- An abstract method that extended content types can use to indicate whether or not they want children.
- AddBaseProperty() : mixed
- Add a property that is directly associtated with a field in the content table.
- AddContentProperty() : mixed
- Alias for AddBaseProperty.
- AddProperty() : mixed
- Add a property definition.
- display_single_element() : array<string|int, mixed>
- A method to display a single input element for an object basic, or extended property.
- HasSearchableContent() : bool
- Indicates whether this content type may have content that can be used by a search module.
- Insert() : mixed
- Initially save a content object with no id to the database.
- Load() : mixed
- Callback function for content types to use to preload content or other things if necessary.
- RemoveProperty() : mixed
- Remove a property from the known property list.
- SetProperties() : mixed
- Subclasses should override this to set their property types using a lot of mProperties.Add statements
- Update() : mixed
- Update the database with the contents of the content object.
Properties
$mItemOrder
The item order of the content in his level Integer
protected
mixed
$mItemOrder
= -1
$mParentId
The ID of the parent, 0 if none Integer
protected
mixed
$mParentId
= -2
Methods
__construct()
Generic constructor. Runs the SetInitialValues fuction.
public
__construct() : mixed
AccessKey()
Get the access key (for accessibility) for this page.
public
AccessKey() : string
Tags
Return values
stringActive()
Returns the Active state
public
Active() : bool
Return values
boolAlias()
Returns the Alias
public
Alias() : string
Return values
stringCachable()
Return whether this page is cachable.
public
Cachable() : bool
Cachable pages (when enabled in global settings) are cached by the browser (also server side caching of HTML output may be enabled)
Return values
boolChangeItemOrder()
Move this content up, or down with respect to its peers.
public
ChangeItemOrder(int $direction) : mixed
Note: This method modifies two content objects.
Parameters
- $direction : int
-
direction. negative value indicates up, positive value indicates down.
Tags
ChildCount()
Returns number of immediate child content items of this content item.
public
ChildCount() : int
Return values
intDefaultContent()
Returns if the page is the default.
public
final DefaultContent() : bool
The default page is the one that is displayed when no alias or pageid is specified in the route Only one content page can be the default.
Return values
boolDelete()
Delete the current content object from the database.
public
Delete() : mixed
Tags
FillParams()
Function for the subclass to parse out data for it's parameters.
public
FillParams(array<string|int, mixed> $params[, bool $editing = false ]) : mixed
This method is typically called from an editor form to allow modifying the content object from form input fields (usually $_POST)
Parameters
- $params : array<string|int, mixed>
-
The input array (usually from $_POST)
- $editing : bool = false
-
Indicates wether this is an edit or add operation.
Tags
FriendlyName()
Returns a friendly name for this content type
public
abstract FriendlyName() : string
Normally the content type returns a string representing the name of the content type translated into the users current language
Tags
Return values
stringGetAdditionalEditorInput()
A utility method to generate a <select> field for selecting additional editors.
public
static GetAdditionalEditorInput(array<string|int, mixed> $addteditors[, int $owner_id = -1 ]) : string
If a positive owner id is specified that user will be excluded from output select element.
Parameters
- $addteditors : array<string|int, mixed>
-
Array of additional editors
- $owner_id : int = -1
-
The current owner of the page.
Tags
Return values
string —HTML output
GetAdditionalEditorOptions()
A utility method to return all of the userid and group ids in a format that is suitable to be used in a select field.
public
static GetAdditionalEditorOptions() : array<string|int, mixed>
Note: group ids are expressed as negative integers in the keys.
Return values
array<string|int, mixed>GetAdditionalEditors()
Return a list of additional editors.
public
GetAdditionalEditors() : mixed
Note: in the returned array, group id's are specified as negative integers.
Return values
mixed —Array of uids and group ids, or null
GetCreationDate()
Retrieve the creation date of this content object.
public
GetCreationDate() : int
Return values
int —Unix Timestamp of the creation date
GetEditableProperties()
Return a list of all the properties that may be edited by the current user when editing this content item in a content editor form.
public
GetEditableProperties() : array<string|int, mixed>
Other content types may override this method, but should call the base method at the start.
Tags
Return values
array<string|int, mixed> —Array of stdclass objects containing name (string), tab (string), priority (integer), required (bool) members
GetModifiedDate()
Retrieve the date of the last modification of this content object.
public
GetModifiedDate() : int
Return values
int —Unix Timestamp of the modification date.
GetModuleInstance()
Returns the instance of the module this content type belongs to
public
final GetModuleInstance() : mixed
GetProperties()
Get all of the properties for this content object. independent of whether the user is entitled to view them, or not.
public
GetProperties() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —of stdclass objects
GetPropertyValue()
Get the value for the named property.
public
GetPropertyValue(string $name) : mixed
Properties will be loaded from the database if necessary.
Parameters
- $name : string
Return values
mixed —String value, or null if the property does not exist.
GetTabElements()
Get the elements for a specific tab.
public
GetTabElements(string $key[, bool $adding = FALSE ]) : array<string|int, mixed>
Parameters
- $key : string
-
tab key
- $adding : bool = FALSE
-
Whether this is an add or edit operation.
Return values
array<string|int, mixed> —An array of arrays. Index 0 of each element should be a prompt field, and index 1 should be the input field for the prompt.
GetTabMessage()
Get an optional message for each tab.
public
GetTabMessage(string $key) : string
Parameters
- $key : string
-
the tab key (as returned with GetTabNames)
Tags
Return values
string —html text to display at the top of the tab.
GetTabNames()
Used from a page that allows content editing.
public
GetTabNames() : array<string|int, mixed>
This method provides a list of distinct sections that devides up the various logical sections that this content type supports for editing.
Tags
Return values
array<string|int, mixed> —associative array list of tab keys and labels.
GetURL()
A function to get the internally generated URL for this content type.
public
GetURL([bool $rewrite = true ]) : string
This method may be overridden by content types.
Parameters
- $rewrite : bool = true
-
if true, and mod_rewrite is enabled, build a URL suitable for mod_rewrite.
Return values
stringHandlesAlias()
Content object handles the alias
public
HandlesAlias() : bool
Tags
Return values
bool —default is false.
HasChildren()
Method to indicate whether the current page has children.
public
HasChildren([bool $activeonly = false ]) : bool
Parameters
- $activeonly : bool = false
-
Should we test only for active children.
Return values
boolHasPreview()
Returns whether preview should be available for this content type
public
HasPreview() : bool
Tags
Return values
boolHasProperty()
Test whether this content page has the named property.
public
HasProperty(string $name) : bool
Properties will be loaded from the database if necessary.
Parameters
- $name : string
Return values
boolHasTemplate()
Indicates whether ths page type uses a template.
public
HasTemplate() : bool
i.e: some content types like sectionheader and separator do not.
Tags
Return values
bool —default FALSE
HasUsableLink()
An abstract method that indicates that this content type is navigable and generates a useful URL.
public
HasUsableLink() : bool
Tags
Return values
bool —Default TRUE
Hierarchy()
Returns the Hierarchy of the current page.
public
Hierarchy() : string
A string like #.##.## indicating the path to this page and it's order this value uses the item order when calculating the output i.e: 3.3.3 to indicate the third grandghild of the third child of the third root page.
Return values
stringHierarchyPath()
Returns the Hierarchy Path.
public
final HierarchyPath() : string
Similar to the Hierarchy and IdHierarchy this string uses page aliases and outputs a string like root_alias/parent_alias/page_alias
Return values
stringId()
Returns the ID
public
Id() : mixed
IdHierarchy()
Returns the Id Hierarchy.
public
final IdHierarchy() : string
A string like #.##.## indicating the path to the page and it's order this property uses the id's of pages when calculating the output i.e: 21.5.17 to indicate that page id 17 is the child of page with id 5 which is inturn the child of the page with id 21
Return values
stringIsCopyable()
An abstract method indicating whether the content type is copyable.
public
IsCopyable() : bool
Tags
Return values
bool —default FALSE
IsDefaultPossible()
Indicates whether this content type can be the default page for a CMSMS website.
public
IsDefaultPossible() : mixed
The content editor module may adjust it's user interface to not allow setting pages that return false for this method as the default page.
Tags
IsPermitted()
Indicates wether the current user is permitted to view this content page.
public
IsPermitted() : bool
Tags
Return values
boolIsSearchable()
Indicates whether this content type is searchable.
public
IsSearchable() : bool
Searchable pages can be indexed by the search module.
This function by default uses a combination of other abstract methods to determine if the page is searchable but extended content types can override this.
Tags
Return values
boolIsSystemPage()
An abstract method to indicate whether this content type generates a system page.
public
IsSystemPage() : bool
System pages are used to handle things like 404 errors etc.
Tags
Return values
bool —default FALSE
IsViewable()
Indicates whether this content type is viewable (i.e: can be rendered).
public
IsViewable() : bool
some content types (like redirection links) are not viewable.
Tags
Return values
bool —Default is True
ItemOrder()
Returns the ItemOrder The ItemOrder is used to specify the order of this page amongst its peers
public
ItemOrder() : int
Return values
intLang()
Retrieve a language string from the module.
public
Lang(string $name[, array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $name : string
-
The key for the language string
- $params : array<string|int, mixed> = array()
-
Optional parameters for use in vsprintf
LastModifiedBy()
Return the integer id of the admin user that last modified this content item.
public
LastModifiedBy() : int
Return values
intLoadFromData()
Load the content of the object from an array.
public
LoadFromData(array<string|int, mixed> &$data[, bool $loadProperties = false ]) : mixed
This method modifies the current object.
There is no check on the data provided, because this is the job of ValidateData
Upon failure the object comes back to initial values and returns FALSE
Parameters
- $data : array<string|int, mixed>
-
Data as loaded from the database
- $loadProperties : bool = false
-
Optionally load content properties at the same time.
Tags
MenuText()
Returns the menu text for this content page.
public
MenuText() : string
The MenuText is by default used as the text portion of a navigation link.
Return values
stringMetadata()
Returns the Metadata
public
Metadata() : string
Return values
stringModuleName()
A method for returning the module that the content type belongs to.
public
abstract ModuleName() : string
Tags
Return values
stringName()
Returns the Name
public
Name() : string
Return values
stringOldItemOrder()
Returns the OldItemOrder.
public
OldItemOrder() : int
The OldItemOrder is used to specify the item order before changes were done
Return values
intOwner()
Returns the Owners user id
public
Owner() : int
Return values
intParentId()
Returns the id of this pages parent.
public
ParentId() : int
The parent id may be -2 to indicate a new page. A parent id value of -1 indicates that the page has no parent. oterwise a positive integer is returned.
Return values
intProperties()
Content page objects only directly store enough information to build a basic navigation from content objects.
public
Properties() : array<string|int, mixed>
This method will return all of the other parts of the content object.
Note: this method does not directly load properties.
Return values
array<string|int, mixed>RequiresAlias()
Indicates whether this content type requires an alias.
public
RequiresAlias() : bool
Some content types that are not directly navigable do not require page aliases.
Tags
Return values
boolSave()
Save or update the content.
public
Save() : mixed
Tags
Secure()
Return whether this page should be accessed via a secure protocol.
public
Secure() : bool
The secure flag effects whether the ssl protocol and appropriate config entries are used when generating urls to this page.
Return values
boolSetAccessKey()
Set the access key (for accessibility) for this page
public
SetAccessKey(string $accesskey) : mixed
Parameters
- $accesskey : string
Tags
SetActive()
Sets this page as active
public
SetActive(bool $active) : mixed
Parameters
- $active : bool
SetAdditionalEditors()
Set the list of additional editors.
public
SetAdditionalEditors(mixed $editorarray) : mixed
Note: in the provided array, group id's are specified as negative integers.
Parameters
- $editorarray : mixed
-
Array of uids and group ids, or null
SetAlias()
Set the page alias for this content page.
public
SetAlias([string $alias = null ][, bool $doAutoAliasIfEnabled = true ]) : mixed
If an empty alias is supplied, and depending upon the doAutoAliasIfEnabled flag, and config entries a suitable alias may be calculated from other data in the page object This method relies on the menutext and the name of the content page already being set.
Parameters
- $alias : string = null
-
The alias
- $doAutoAliasIfEnabled : bool = true
-
Whether an alias should be calculated or not.
Tags
SetCachable()
Set whether this page is cachable
public
SetCachable(bool $cachable) : mixed
Parameters
- $cachable : bool
SetDefaultContent()
Sets if this page should be considered the default.
public
SetDefaultContent(bool $defaultcontent) : mixed
Note: does not modify the flags for any other content page.
Parameters
- $defaultcontent : bool
SetLastModifiedBy()
Set the last modified date for this item
public
SetLastModifiedBy(int $lastmodifiedby) : mixed
Parameters
- $lastmodifiedby : int
SetMenuText()
Sets the menu text for this content page
public
SetMenuText(string $menutext) : mixed
Parameters
- $menutext : string
SetMetadata()
Set the page metadata
public
SetMetadata(string $metadata) : mixed
Parameters
- $metadata : string
-
The metadata
SetName()
Set the the page name
public
SetName(string $name) : mixed
Parameters
- $name : string
-
The name.
SetOwner()
Set the page owner.
public
SetOwner(int $owner) : mixed
No validation is performed.
Parameters
- $owner : int
-
Owner's user id
SetParentId()
Sets the parent of this page.
public
SetParentId(int $parentid) : mixed
Parameters
- $parentid : int
-
The numeric page parent id. Use -1 for no parent.
SetPropertyValue()
Set the value of a the named property.
public
SetPropertyValue(string $name, string $value) : mixed
This method will load properties for this content page if necessary.
Parameters
- $name : string
-
The property name
- $value : string
-
The property value.
SetPropertyValueNoLoad()
Set the value of a the named property.
public
SetPropertyValueNoLoad(string $name, string $value) : mixed
This method will not load properties
Parameters
- $name : string
-
The property name
- $value : string
-
The property value.
SetSecure()
Set whether this page should be accessed via a secure protocol.
public
SetSecure(bool $secure) : mixed
The secure flag effectsw whether the ssl protocol and appropriate config entries are used when generating urls to this page.
Parameters
- $secure : bool
SetShowInMenu()
Sets whether this page should be (by default) shown in menus
public
SetShowInMenu(bool $showinmenu) : mixed
Parameters
- $showinmenu : bool
SetTabIndex()
Set the page tabindex value
public
SetTabIndex(int $tabindex) : mixed
Parameters
- $tabindex : int
-
tabindex
SetTemplateId()
Set the id of the template associated with this content page.
public
SetTemplateId(int $templateid) : mixed
Parameters
- $templateid : int
SetTitleAttribute()
Set the title attribute of the page
public
SetTitleAttribute(string $titleattribute) : mixed
The title attribue can be used in navigations to set the "title=" attribute of a link some menu templates may ignore this.
Parameters
- $titleattribute : string
-
The title attribute
SetURL()
Set the page url (if any) associated with this content page.
public
SetURL(string $url) : mixed
Note: some content types do not support page urls. The url should be relative to the root url. i.e: /some/path/to/the/page
Parameters
- $url : string
Show()
Return the raw value for a content property.
public
Show([string $propname = 'content_en' ]) : string
If no proeprty name is specified 'content_en' is assumed
Parameters
- $propname : string = 'content_en'
-
An optional property name to display. If none specified, the system should assume content_en.
Tags
Return values
stringShowAdditionalEditors()
Provides an input element to display the list of additional editors.
public
ShowAdditionalEditors([array<string|int, mixed> $addteditors = '' ]) : string
This method is usually called from within this object.
Parameters
- $addteditors : array<string|int, mixed> = ''
-
An optional array of additional editor id's (group ids specified with negative values)
Tags
Return values
string —The input element.
ShowInMenu()
Returns whether this content item should (by default) be shown in navigation menus.
public
ShowInMenu() : bool
Tags
Return values
boolTabIndex()
Return the page tabindex value
public
TabIndex() : int
Return values
intTemplateId()
Return the id of the template associated with this content page.
public
TemplateId() : mixed
Tags
TitleAttribute()
Return the page title attribute
public
TitleAttribute() : string
Return values
stringToData()
Convert the current object to an array.
public
ToData() : array<string|int, mixed>
This can be considered a simple DTO (Data Transfer Object)
Tags
Return values
array<string|int, mixed>Type()
Returns the Type
public
Type() : string
Return values
stringURL()
Return the page url (if any) associated with this content page.
public
URL() : string
The page url is not the complete URL to the content page, but merely the 'stub' or 'slug' appended after the root url when accessing the site If the page is specified as the default page then the "page url" will be ignored. Some content types do not support page urls.
Return values
stringValidateData()
Test if the content object is valid.
public
ValidateData() : mixed
This function is used to check that no compulsory argument has been forgotten by the user
We do not check the Id because there can be no Id (new content) That's up to Save to check this.
Tags
WantsChildren()
An abstract method that extended content types can use to indicate whether or not they want children.
public
WantsChildren() : bool
Some content types, such as a separator do not want to have any children.
Tags
Return values
bool —Default TRUE
AddBaseProperty()
Add a property that is directly associtated with a field in the content table.
protected
AddBaseProperty(string $name, int $priority[, bool $is_required = 0 ]) : mixed
Parameters
- $name : string
-
The property name
- $priority : int
-
The priority
- $is_required : bool = 0
-
Whether this field is required for this content type
Tags
AddContentProperty()
Alias for AddBaseProperty.
protected
AddContentProperty(string $name, int $priority[, bool $is_required = 0 ]) : mixed
Parameters
- $name : string
- $priority : int
- $is_required : bool = 0
AddProperty()
Add a property definition.
protected
AddProperty(string $name, int $priority[, string $tab = self::TAB_MAIN ][, bool $required = FALSE ][, bool $basic = FALSE ]) : mixed
Parameters
- $name : string
-
The property name
- $priority : int
-
The property priority, for sorting.
- $tab : string = self::TAB_MAIN
-
The tab for the property (see tab constants)
- $required : bool = FALSE
-
(whether the property is required)
- $basic : bool = FALSE
-
Whether or not the property is a basic property (editable by even restricted editors)
Tags
display_single_element()
A method to display a single input element for an object basic, or extended property.
protected
display_single_element(string $one, bool $adding) : array<string|int, mixed>
Parameters
- $one : string
-
The property name
- $adding : bool
-
Whether or not we are in add or edit mode.
Tags
Return values
array<string|int, mixed> —consisting of two elements. A label, and the input element.
HasSearchableContent()
Indicates whether this content type may have content that can be used by a search module.
protected
HasSearchableContent() : bool
Content types should override this method if they are special purpose content types and they cannot support searchable content in any way. Content types such as ErrorPage, Section Header, and Separator are examples.
Tags
Return values
boolInsert()
Initially save a content object with no id to the database.
protected
Insert() : mixed
Like the Update method this method will determine a new item order save the record, save properties and additional editors, but will not update the hierarchy positions.
Tags
Load()
Callback function for content types to use to preload content or other things if necessary.
protected
Load() : mixed
This is called right after the content is loaded from the database.
Tags
RemoveProperty()
Remove a property from the known property list.
protected
RemoveProperty(string $name, string $dflt) : mixed
Specify a default value to use if the property is called.
Parameters
- $name : string
-
The property name
- $dflt : string
-
The default value.
SetProperties()
Subclasses should override this to set their property types using a lot of mProperties.Add statements
protected
SetProperties() : mixed
Tags
Update()
Update the database with the contents of the content object.
protected
Update() : mixed
This method will calculate a new item order for the object if necessary and then save the content record, the additional editors, and the properties. Additionally, if a page url is specified a static route will be created
Because multiple content objects may be modified in one batch the calling function is responsible for ensuring that page hierarchies are updated.