lucee.Componentcontentbox.models.BaseEntityMethods
contentbox.models.content.BaseContent
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- A mapped super class used for any ContentBox content object. All concrete content objects will inherit from this one.
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
HTMLDescription
|
true
|
false
|
|
any
|
HTMLKeywords
|
true
|
false
|
|
any
|
HTMLTitle
|
true
|
false
|
|
any
|
JSONPrettyPrint
|
true
|
false
|
|
any
|
allowComments
|
true
|
true
|
false
|
any
|
cache
|
true
|
true
|
false
|
any
|
cacheLastAccessTimeout
|
0
|
true
|
false
|
any
|
cacheTimeout
|
0
|
true
|
false
|
array
|
categories
|
true
|
false
|
|
any
|
categoryService
--------------------------------------------------------------------------.
|
true
|
false
|
|
any
|
childContentTemplate
|
true
|
false
|
|
array
|
children
|
true
|
false
|
|
array
|
commentSubscriptions
|
true
|
false
|
|
array
|
comments
|
true
|
false
|
|
any
|
contentID
--------------------------------------------------------------------------.
|
true
|
false
|
|
any
|
contentService
|
true
|
false
|
|
any
|
contentTemplate
|
true
|
false
|
|
any
|
contentTemplateService
|
true
|
false
|
|
any
|
contentType
|
true
|
false
|
|
any
|
contentVersionService
|
true
|
false
|
|
array
|
contentVersions
|
true
|
false
|
|
date
|
createdDate
--------------------------------------------------------------------------.
|
true
|
false
|
|
any
|
creator
--------------------------------------------------------------------------.
|
true
|
false
|
|
any
|
customFieldService
|
true
|
false
|
|
array
|
customFields
|
true
|
false
|
|
any
|
expireDate
|
true
|
false
|
|
any
|
featuredImage
|
true
|
false
|
|
any
|
i18n
|
true
|
false
|
|
any
|
isDeleted
|
false
|
true
|
false
|
any
|
isPublished
|
true
|
true
|
false
|
array
|
linkedContent
|
true
|
false
|
|
any
|
markup
|
HTML
|
true
|
false
|
any
|
mediaService
|
true
|
false
|
|
date
|
modifiedDate
|
true
|
false
|
|
any
|
numberOfChildren
|
0
|
true
|
false
|
any
|
numberOfComments
|
0
|
true
|
false
|
any
|
numberOfHits
--------------------------------------------------------------------------.
|
0
|
true
|
false
|
any
|
numberOfVersions
|
0
|
true
|
false
|
any
|
parent
|
true
|
false
|
|
any
|
passwordProtection
|
true
|
false
|
|
any
|
publishedDate
|
true
|
false
|
|
array
|
relatedContent
|
true
|
false
|
|
any
|
renderedContent
--------------------------------------------------------------------------.
|
true
|
false
|
|
any
|
settingService
|
true
|
false
|
|
any
|
showInSearch
|
true
|
true
|
false
|
any
|
site
|
true
|
false
|
|
any
|
slug
|
true
|
false
|
|
any
|
stats
|
true
|
false
|
|
any
|
title
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Base constructor. |
Method Summary | |
---|---|
BaseContent
|
addCategories(any category)
Only adds it if not found in content object. |
any
|
addChild(any child)
|
any
|
addComment(any comment)
|
any
|
addCommentSubscription(any commentSubscription)
|
any
|
addContentVersion(any contentVersion)
|
any
|
addCustomField(any customField)
|
any
|
addExpiredTime(any hour, any minute)
add expired timestamp to property. |
any
|
addJoinedExpiredTime(string timeString)
add expired timestamp to property. |
any
|
addJoinedPublishedTime(string timeString)
add published timestamp to property. |
any
|
addLinkedContent(any linkedContent)
|
BaseContent
|
addNewContentVersion(any content, [any changelog=''], any author, [boolean isPreview='false'])
Add a new content version to the content object. |
any
|
addPublishedTime(any hour, any minute)
add published timestamp to property. |
any
|
addRelatedContent(any relatedContent)
|
BaseContent
|
applyContentTemplate()
Apply any assigned content templates to this instance. |
string
|
buildContentCacheCleanupKey()
This builds a partial cache key so we can clean from the cache many permutations of the content object. |
string
|
buildContentCacheKey()
Build content cache keys according to sent content object. |
boolean
|
canCacheContent()
Verify we can do content caching on this content object using global and local rules. |
BaseContent
|
clone(any author, any original, any originalService, boolean publish, any originalSlugRoot, any newSlugRoot)
Clones the object and stores it in the database. |
boolean
|
commentsAllowed()
Determines if the content object can have comments or not. |
ContentVersion
|
getActiveContent()
Get the latest active version object, empty new one if none assigned. |
string
|
getAllowComments()
|
any
|
getAuthor()
Shorthand Author from latest version or null if any yet. |
string
|
getAuthorEmail()
Shorthand Author email from latest version. |
string
|
getAuthorName()
Shorthand Author name from latest version. |
string
|
getCache()
|
string
|
getCacheLastAccessTimeout()
|
string
|
getCacheTimeout()
|
string
|
getCategories()
|
array
|
getCategoriesArray()
Get an array of category slugs for this content object. |
string
|
getCategoriesList()
Get a list string of the categories this content object has. |
string
|
getCategoryService()
|
string
|
getChildContentTemplate()
|
string
|
getChildren()
|
array
|
getChildrenSnapshot()
Build the array of children snapshots. |
string
|
getCommentSubscriptions()
|
string
|
getComments()
|
string
|
getContent()
Retrieves the latest content string from the latest version un-translated. |
string
|
getContentID()
|
string
|
getContentService()
|
any
|
getContentTemplate()
Getter overload to return either the assigned template or the global template for the site. |
string
|
getContentTemplateService()
|
string
|
getContentType()
|
string
|
getContentVersionService()
|
string
|
getContentVersions()
|
string
|
getCreatedDate()
|
string
|
getCreator()
|
string
|
getCreatorEmail()
Shorthand Creator email. |
string
|
getCreatorName()
Shorthand Creator name. |
struct
|
getCreatorSnapshot()
Build a creator snapshot. |
any
|
getCustomField(any key, [any defaultValue])
Shortcut to get a custom field value. |
string
|
getCustomFieldService()
|
string
|
getCustomFields()
|
struct
|
getCustomFieldsAsStruct()
Get custom fields as a structure representation. |
string
|
getDisplayExpireDate([any dateFormat='[runtime expression]'], [any timeFormat='[runtime expression]'], [boolean showTime='true'])
Get the expire date using the default date format and time format. |
string
|
getDisplayPublishedDate([any dateFormat='[runtime expression]'], [any timeFormat='[runtime expression]'], [boolean showTime='true'])
Get the published date using the default date format and time format. |
string
|
getExpireDate()
|
string
|
getExpireDateTime()
This method retrieves the time of the expiration for the content object in UTC timezone. |
string
|
getFeaturedImage()
|
any
|
getFeaturedImageURL()
Returns the URL of the featured image. |
string
|
getHTMLDescription()
|
string
|
getHTMLKeywords()
|
string
|
getHTMLTitle()
|
string
|
getI18n()
|
struct
|
getInfoSnapshot()
Utility method to get a snapshot of this content object. |
string
|
getIsDeleted()
|
string
|
getIsPublished()
|
string
|
getJSONPrettyPrint()
|
struct
|
getLastEditorSnapshot()
Build a last editor snapshot. |
string
|
getLinkedContent()
|
array
|
getLinkedContentSnapshot()
Build the array of linked content snapshots. |
string
|
getMarkup()
|
string
|
getMediaService()
|
string
|
getModifiedDate()
|
numeric
|
getNumberOfActiveVersions()
Get the total number of active versions this content object has. |
numeric
|
getNumberOfApprovedComments()
Get the total number of approved comments this content object has. |
numeric
|
getNumberOfChildren()
Get the number of children. |
numeric
|
getNumberOfComments()
Get the total number of comments this content object has. |
numeric
|
getNumberOfHits()
Get the number of hits. |
numeric
|
getNumberOfVersions()
Get the total number of versions this content object has. |
string
|
getParent()
|
any
|
getParentID()
Get parent ID if set or empty if none. |
any
|
getParentName()
Get parent name or empty if none. |
struct
|
getParentSnapshot()
Build a parent snapshot. |
string
|
getPasswordProtection()
|
string
|
getPublishedDate()
|
string
|
getPublishedDateTime()
This method retrieves the time of the publishing for the content object in UTC timezone. |
string
|
getRelatedContent()
|
string
|
getRelatedContentIDs()
Returns a list of active related content for this piece of content. |
array
|
getRelatedContentSnapshot()
Build the array of related content snapshots. |
any
|
getRenderedContent()
Shortcut to get the rendered content. |
any
|
getRenderedExcerpt()
Shortcut to get the rendered excerpt. |
string
|
getSettingService()
|
string
|
getShowInSearch()
|
string
|
getSite()
|
any
|
getSiteID()
Shortcut to get the site id. |
any
|
getSiteName()
Shortcut to get the site name. |
any
|
getSiteSlug()
Shortcut to get the site slug. |
struct
|
getSiteSnapshot()
Build a site snapshot. |
string
|
getSlug()
|
string
|
getStats()
|
string
|
getTitle()
|
boolean
|
hasActiveContent()
Verify if this content object has an active version with content. |
boolean
|
hasCategories([any categories])
|
boolean
|
hasChild([any child])
|
boolean
|
hasChildContentTemplate([any childContentTemplate])
|
boolean
|
hasComment([any comment])
|
boolean
|
hasCommentSubscription([any commentSubscription])
|
boolean
|
hasContentTemplate([any contentTemplate])
|
boolean
|
hasContentVersion([any contentVersion])
|
boolean
|
hasCreator([any creator])
|
boolean
|
hasCustomField([any customField])
|
boolean
|
hasLinkedContent([any linkedContent])
|
boolean
|
hasParent([any parent])
|
boolean
|
hasRelatedContent([any relatedContent])
|
boolean
|
hasSite([any site])
|
boolean
|
hasStats([any stats])
|
any
|
inflateCustomFields(numeric fieldCount, struct memento)
Inflate custom fields from the incoming count and memento structure. |
BaseContent
|
inflateRelatedContent(any relatedContent)
Inflates from comma-delimited list (or array) of id's. |
boolean
|
isContentPublished()
Bit that denotes if the content has been published or not. |
boolean
|
isContentStore()
Determines if the content object is a content store type. |
boolean
|
isExpired()
Bit that denotes if the content has expired or not, in order to be expired the content must have been published as well. |
boolean
|
isLoaded()
Is entity loaded. |
boolean
|
isPasswordProtected()
isPassword Protected. |
boolean
|
isPublishedInFuture()
Bit that denotes if the content has been published or not in the future. |
boolean
|
isSameSite(any site)
Verifies that the incoming site is the same as the content has already. |
private any
|
maxContentVersionChecks()
Verify and rotate maximum content versions. |
any
|
onDIComplete()
Prepare the instance for usage. |
BaseContent
|
removeAllCategories()
|
BaseContent
|
removeAllCustomFields()
|
BaseContent
|
removeAllLinkedContent()
|
BaseContent
|
removeCategories(any category)
Remove only if it's found in the content object. |
boolean
|
removeChild(any child)
|
boolean
|
removeComment(any comment)
|
boolean
|
removeCommentSubscription(any commentSubscription)
|
boolean
|
removeContentVersion(any contentVersion)
|
boolean
|
removeCustomField(any customField)
|
boolean
|
removeLinkedContent(any linkedContent)
|
boolean
|
removeRelatedContent(any relatedContent)
|
any
|
renderContent()
Render content out using translations, caching, etc. |
any
|
renderContentSilent([any content='[runtime expression]'])
Renders the content silently so no caching, or extra fluff is done, just content translation rendering. |
BaseContent
|
setActiveContent(any content)
Set the active content version manually, usually great for previews. |
any
|
setAllowComments(any allowComments)
|
any
|
setCache(any cache)
|
any
|
setCacheLastAccessTimeout(any cacheLastAccessTimeout)
|
any
|
setCacheTimeout(any cacheTimeout)
|
any
|
setCategories(array categories)
|
any
|
setCategoryService(any categoryService)
|
any
|
setChildContentTemplate(any childContentTemplate)
|
BaseContent
|
setChildren(array children)
Override the setChildren. |
any
|
setCommentSubscriptions(array commentSubscriptions)
|
BaseContent
|
setComments(array comments)
Override the setComments. |
any
|
setContentID(any contentID)
|
any
|
setContentService(any contentService)
|
any
|
setContentTemplate(any contentTemplate)
|
any
|
setContentTemplateService(any contentTemplateService)
|
any
|
setContentVersionService(any contentVersionService)
|
BaseContent
|
setContentVersions(array contentVersions)
Override the setContentVersions. |
any
|
setCreatedDate(date createdDate)
|
any
|
setCreator(any creator)
|
any
|
setCustomFieldService(any customFieldService)
|
BaseContent
|
setCustomFields(array customFields)
Override the setter. |
any
|
setExpireDate(any expireDate)
|
any
|
setFeaturedImage(any featuredImage)
|
any
|
setHTMLDescription(any HTMLDescription)
|
any
|
setHTMLKeywords(any HTMLKeywords)
|
any
|
setHTMLTitle(any HTMLTitle)
|
any
|
setI18n(any i18n)
|
any
|
setIsDeleted(any isDeleted)
|
any
|
setIsPublished(any isPublished)
|
any
|
setJSONPrettyPrint(any JSONPrettyPrint)
|
any
|
setLinkedContent(array linkedContent)
|
any
|
setMarkup(any markup)
|
any
|
setMediaService(any mediaService)
|
any
|
setModifiedDate(date modifiedDate)
|
any
|
setNumberOfChildren(any numberOfChildren)
|
any
|
setNumberOfComments(any numberOfComments)
|
any
|
setNumberOfHits(any numberOfHits)
|
any
|
setNumberOfVersions(any numberOfVersions)
|
BaseContent
|
setParent([any parent])
Override setter as we do some hiearchy slug magic when setting a parent. |
any
|
setPasswordProtection(any passwordProtection)
|
any
|
setPublishedDate(any publishedDate)
|
BaseContent
|
setRelatedContent(array relatedContent)
Override the setRelatedContent. |
any
|
setRenderedContent(any renderedContent)
|
any
|
setSettingService(any settingService)
|
any
|
setShowInSearch(any showInSearch)
|
any
|
setSite(any site)
|
any
|
setSlug(any slug)
|
any
|
setStats(any stats)
|
any
|
setTitle(any title)
|
Methods inherited from class contentbox.models.BaseEntityMethods |
---|
appendToMemento, appendToMementoProfile, arrayWrap, getDisplayCreatedDate, getDisplayModifiedDate, getEntityName, getId, includeMixin, preInsert, preUpdate |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Base constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anycolumn
- HTMLDescriptionnotnull
- falselength
- 160serializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- HTMLKeywordsnotnull
- falselength
- 160serializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- HTMLTitlenotnull
- falselength
- 255serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:JSONPrettyPrint@JSONPrettyPrintpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- allowCommentsnotnull
- trueormtype
- booleanserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- cachenotnull
- trueormtype
- booleanindex
- idx_cacheserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- cacheLastAccessTimeoutnotnull
- falseormtype
- integerindex
- idx_cachelastaccesstimeoutserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- cacheTimeoutnotnull
- falseormtype
- integerindex
- idx_cachetimeoutserializable
- truelinktable
- cb_contentCategoriesaccess
- publicrequired
- falsefieldtype
- many-to-manyreturntype
- anycascade
- save-updateorderby
- categoryfkcolumn
- FK_contentIDserializable
- trueinversejoincolumn
- FK_categoryIDcfc
- contentbox.models.content.Categorylazy
- true-------------------------------------------------------------------------- DI -------------------------------------------------------------------------- All DI is done lazyly to avoid any performance issues. Thus the provider annotation
access
- publicrequired
- falsereturntype
- anyinject
- provider:categoryService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anyfkcolumn
- FK_childContentTemplateIDserializable
- truecfc
- contentbox.models.content.ContentTemplatelazy
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- all-delete-orphanorderby
- createdDatebatchsize
- 25singularname
- childfkcolumn
- FK_parentIDserializable
- truecfc
- contentbox.models.content.BaseContentlazy
- extraaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- all-delete-orphanbatchsize
- 25singularname
- commentSubscriptionfkcolumn
- FK_contentIDserializable
- truecfc
- contentbox.models.subscriptions.CommentSubscriptionlazy
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- all-delete-orphanorderby
- createdDatebatchsize
- 25singularname
- commentfkcolumn
- FK_contentIDserializable
- truecfc
- contentbox.models.comments.Commentlazy
- true-------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------
access
- publicrequired
- falsefieldtype
- idreturntype
- anycolumn
- contentIDormtype
- stringupdate
- falsegenerator
- uuidlength
- 36serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:contentService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anyfkcolumn
- FK_contentTemplateIDserializable
- truecfc
- contentbox.models.content.ContentTemplatelazy
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:ContentTemplateService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falseinsert
- falsereturntype
- anycolumn
- contentTypeupdate
- falseindex
- idx_discriminator,idx_publishedserializable
- truesetter
- noaccess
- publicrequired
- falsereturntype
- anyinject
- provider:contentVersionService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- all-delete-orphanorderby
- version descbatchsize
- 25singularname
- contentVersionfkcolumn
- FK_contentIDserializable
- truecfc
- contentbox.models.content.ContentVersionlazy
- true-------------------------------------------------------------------------- STUPID PROPERTIES DUE TO ACF BUG -------------------------------------------------------------------------- There is a bug in acf2016, 2018, 2021 dealing with table inheritance. It has never been fixed. Until it does, keep these.
access
- publicrequired
- falsereturntype
- anycolumn
- createdDatenotnull
- trueormtype
- timestampupdate
- falseserializable
- true-------------------------------------------------------------------------- RELATIONSHIPS --------------------------------------------------------------------------
access
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anynotnull
- truefkcolumn
- FK_authorIDserializable
- truecfc
- contentbox.models.security.Authorlazy
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:customFieldService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falseinverse
- truefieldtype
- one-to-manyreturntype
- anycascade
- all-delete-orphanbatchsize
- 25singularname
- customFieldfkcolumn
- FK_contentIDserializable
- truecfc
- contentbox.models.content.CustomFieldlazy
- extraaccess
- publicrequired
- falsereturntype
- anycolumn
- expireDatenotnull
- falseormtype
- timestampindex
- idx_expireDateserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- featuredImagenotnull
- falselength
- 500serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:i18n@cbi18npersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- isDeletednotnull
- trueormtype
- booleanserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- isPublishednotnull
- trueormtype
- booleanindex
- idx_published,idx_search,idx_publishedSlugserializable
- truelinktable
- cb_relatedContentaccess
- publicrequired
- falseinverse
- truefieldtype
- many-to-manyreturntype
- anycascade
- save-updateorderby
- titlefkcolumn
- FK_relatedContentIDserializable
- trueinversejoincolumn
- FK_contentIDcfc
- contentbox.models.content.BaseContentlazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- markupnotnull
- truelength
- 100serializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:MediaService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- modifiedDatenotnull
- trueormtype
- timestampserializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_content content where content.FK_parentID=contentIDserializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_comment comment where comment.FK_contentID=contentIDserializable
- true-------------------------------------------------------------------------- CALCULATED FIELDS --------------------------------------------------------------------------
access
- publicrequired
- falsereturntype
- anyformula
- select cbStats.hits
from cb_stats cbStats
where cbStats.FK_contentID=contentIDserializable
- trueaccess
- publicrequired
- falsereturntype
- anyformula
- select count(*) from cb_contentVersion versions where versions.FK_contentID=contentIDserializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anyfkcolumn
- FK_parentIDserializable
- truecfc
- contentbox.models.content.BaseContentlazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- passwordProtectionnotnull
- falselength
- 100serializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- publishedDatenotnull
- falseormtype
- timestampindex
- idx_publishedDateserializable
- truelinktable
- cb_relatedContentaccess
- publicrequired
- falsefieldtype
- many-to-manyreturntype
- anycascade
- save-updateorderby
- titlefkcolumn
- FK_contentIDserializable
- trueinversejoincolumn
- FK_relatedContentIDcfc
- contentbox.models.content.BaseContentlazy
- true-------------------------------------------------------------------------- NON PERSISTED PROPERTIES --------------------------------------------------------------------------
access
- publicrequired
- falsereturntype
- anypersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- provider:settingService@contentboxpersistent
- falseserializable
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- showInSearchnotnull
- trueormtype
- booleanindex
- idx_showInSearchserializable
- trueaccess
- publicrequired
- falsefieldtype
- many-to-onereturntype
- anyfetch
- joinnotnull
- truefkcolumn
- FK_siteIDserializable
- truecfc
- contentbox.models.system.Sitelazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- slugnotnull
- trueindex
- idx_slug,idx_publishedSluglength
- 500serializable
- trueaccess
- publicrequired
- falsefieldtype
- one-to-onereturntype
- anycascade
- all-delete-orphanfetch
- joinnotnull
- trueserializable
- truecfc
- contentbox.models.content.Statsmappedby
- relatedContentlazy
- trueaccess
- publicrequired
- falsereturntype
- anycolumn
- titlenotnull
- trueindex
- idx_searchlength
- 500serializable
- trueMethod Detail |
---|
Only adds it if not found in content object
category
child
comment
commentSubscription
contentVersion
customField
add expired timestamp to property
hour
minute
add expired timestamp to property
timeString
- The joined time string (e.g., 12:00)add published timestamp to property
timeString
- The joined time string (e.g., 12:00)linkedContent
Add a new content version to the content object. This does not persist the version. It just makes sure that the content object receives a new active version and it deactivates the previous version. Persisting is done by the handler/service not by this method.
content
- The incoming content string to store as the new version contentchangelog
- The changelog commit message, defaults to empty stringauthor
- The author object that is making the editisPreview
- Is this a preview version or a real versionadd published timestamp to property
hour
minute
relatedContent
Apply any assigned content templates to this instance
This builds a partial cache key so we can clean from the cache many permutations of the content object
Build content cache keys according to sent content object
Verify we can do content caching on this content object using global and local rules
Clones the object and stores it in the database - Wipe primary key, and descendant keys - Prepare for cloning of entire hierarchies - Make sure categories are cloned
author
- The author doing the cloningoriginal
- The original content object that will be cloned into this content objectoriginalService
- The ContentBox content service objectpublish
- Publish pages or leave as draftsoriginalSlugRoot
- The original slug that will be replaced in all cloned contentnewSlugRoot
- The new slug root that will be replaced in all cloned contentDetermines if the content object can have comments or not
Get the latest active version object, empty new one if none assigned
Shorthand Author from latest version or null if any yet
Shorthand Author email from latest version
Shorthand Author name from latest version
Get an array of category slugs for this content object
Get a list string of the categories this content object has.
Build the array of children snapshots
Retrieves the latest content string from the latest version un-translated
Getter overload to return either the assigned template or the global template for the site
Shorthand Creator email
Shorthand Creator name
Build a creator snapshot
Shortcut to get a custom field value
key
- The custom field key to getdefaultValue
- The default value if the key is not found.Get custom fields as a structure representation
Get the expire date using the default date format and time format If the expire date is null or empty an empty string is returned.
dateFormat
- The date format to use, defaulted by ContentBox to mmm dd, yyyytimeFormat
- The time format to use, defaulted by ContentBox to HH:mm:ss zshowTime
- Show the time or just the dateGet the published date using the default date format and time format If the publish date is null or empty an empty string is returned.
dateFormat
- The date format to use, defaulted by ContentBox to mmm dd, yyyytimeFormat
- The time format to use, defaulted by ContentBox to HH:mm:ss zshowTime
- Show the time or just the dateThis method retrieves the time of the expiration for the content object in UTC timezone. The format expected back is {hour}:{minute}. If the expire date is null an empty string is returned.
Returns the URL of the featured image
Utility method to get a snapshot of this content object
Build a last editor snapshot
Build the array of linked content snapshots
Get the total number of active versions this content object has
Get the total number of approved comments this content object has
Get the number of children
Get the total number of comments this content object has
Get the number of hits
Get the total number of versions this content object has
Get parent ID if set or empty if none
Get parent name or empty if none
Build a parent snapshot
This method retrieves the time of the publishing for the content object in UTC timezone. The format expected back is {hour}:{minute}. If the publish date is null an empty string is returned.
Returns a list of active related content for this piece of content
Build the array of related content snapshots
Shortcut to get the rendered content
Shortcut to get the rendered excerpt
Shortcut to get the site id
Shortcut to get the site name
Shortcut to get the site slug
Build a site snapshot
Verify if this content object has an active version with content
categories
child
childContentTemplate
comment
commentSubscription
contentTemplate
contentVersion
creator
customField
linkedContent
parent
relatedContent
site
stats
Inflate custom fields from the incoming count and memento structure
fieldCount
memento
Inflates from comma-delimited list (or array) of id's
relatedContent
- The list or array of relatedContent idsBit that denotes if the content has been published or not
Determines if the content object is a content store type
Bit that denotes if the content has expired or not, in order to be expired the content must have been published as well
Is entity loaded
isLoaded
in class
BaseEntityMethods
isPassword Protected
Bit that denotes if the content has been published or not in the future
Verifies that the incoming site is the same as the content has already
site
- The site id or site object to verifyVerify and rotate maximum content versions
Prepare the instance for usage
Remove only if it's found in the content object
category
child
comment
commentSubscription
contentVersion
customField
linkedContent
relatedContent
Render content out using translations, caching, etc.
Renders the content silently so no caching, or extra fluff is done, just content translation rendering.
content
- The content markup to translate, by default it uses the active content version's contentSet the active content version manually, usually great for previews
content
- The content to set as the active versionallowComments
cache
cacheLastAccessTimeout
cacheTimeout
categories
categoryService
childContentTemplate
Override the setChildren
children
commentSubscriptions
Override the setComments
comments
contentID
contentService
contentTemplate
contentTemplateService
contentVersionService
Override the setContentVersions
contentVersions
createdDate
creator
customFieldService
Override the setter
customFields
expireDate
featuredImage
HTMLDescription
HTMLKeywords
HTMLTitle
i18n
isDeleted
isPublished
JSONPrettyPrint
linkedContent
markup
mediaService
modifiedDate
numberOfChildren
numberOfComments
numberOfHits
numberOfVersions
Override setter as we do some hiearchy slug magic when setting a parent
parent
- The parent object or nullpasswordProtection
publishedDate
Override the setRelatedContent
relatedContent
- The related content to setrenderedContent
settingService
showInSearch
site
slug
stats
title