contentbox.models.content

Class BaseContent

lucee.Component
    extended by contentbox.models.BaseEntityMethods
      extended by contentbox.models.content.BaseContent
Direct Known Subclasses:
ContentStore , Entry , Page

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- A mapped super class used for contentbox content: entries and pages

Class Attributes:
  • entityname : cbContent
  •  
  • cacheuse : read-write
  •  
  • table : cb_content
  •  
  • synchronized : false
  •  
  • cachename : cbContent
  •  
  • discriminatorcolumn : contentType
  •  
  • accessors : false
  •  
  • persistent : true
  •  
    Property Summary
    type property default serializable required
    array activeContent


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = save-update
    • fkcolumn = FK_contentID
    • cfc = contentbox.models.content.ContentVersion
    • where = isActive = 1
    • lazy = extra
    true false
    any allowComments


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    true true false
    any cache


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_cache
    true true false
    any cachebox


    • access = public
    • returntype = any
    • inject = cachebox
    • persistent = false
    true false
    any cacheLastAccessTimeout


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = integer
    • index = idx_cachelastaccesstimeout
    0 true false
    any cacheLayout


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_cachelayout
    true true false
    any cacheTimeout


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = integer
    • index = idx_cachetimeout
    0 true false
    array categories


    • linktable = cb_contentCategories
    • access = public
    • fieldtype = many-to-many
    • returntype = any
    • cascade = all
    • orderby = category
    • fkcolumn = FK_contentID
    • inversejoincolumn = FK_categoryID
    • cfc = contentbox.models.content.Category
    • lazy = extra
    true false
    any categoryService


    • access = public
    • returntype = any
    • inject = categoryService@cb
    • persistent = false
    true false
    array children


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • orderby = createdDate
    • batchsize = 25
    • singularname = child
    • fkcolumn = FK_parentID
    • cfc = contentbox.models.content.BaseContent
    • lazy = extra
    true false
    array comments


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • orderby = createdDate
    • batchsize = 25
    • singularname = comment
    • fkcolumn = FK_contentID
    • cfc = contentbox.models.comments.Comment
    • lazy = extra
    true false
    array commentSubscriptions


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • batchsize = 25
    • singularname = commentSubscription
    • fkcolumn = FK_contentID
    • cfc = contentbox.models.subscriptions.CommentSubscription
    • lazy = extra
    true false
    any contentID


    • access = public
    • fieldtype = id
    • returntype = any
    • params = { allocationSize = 1, sequence = 'contentID_seq' }
    • notnull = true
    • generator = native
    • setter = no
    true false
    any contentService


    • access = public
    • returntype = any
    • inject = contentService@cb
    • persistent = false
    true false
    any contentType


    • access = public
    • insert = false
    • returntype = any
    • update = false
    • index = idx_discriminator,idx_published
    • setter = no
    true false
    array contentVersions


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • batchsize = 25
    • singularname = contentVersion
    • fkcolumn = FK_contentID
    • cfc = contentbox.models.content.ContentVersion
    • lazy = extra
    true false
    any contentVersionService


    • access = public
    • returntype = any
    • inject = contentVersionService@cb
    • persistent = false
    true false
    date createdDate


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = timestamp
    • update = false
    • index = idx_createDate
    true false
    any creator


    • access = public
    • fieldtype = many-to-one
    • returntype = any
    • fetch = join
    • notnull = true
    • fkcolumn = FK_authorID
    • cfc = contentbox.models.security.Author
    • lazy = true
    true false
    array customFields


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • batchsize = 25
    • singularname = customField
    • fkcolumn = FK_contentID
    • cfc = contentbox.models.content.CustomField
    • lazy = extra
    true false
    any customFieldService


    • access = public
    • returntype = any
    • inject = customFieldService@cb
    • persistent = false
    true false
    any expireDate


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = timestamp
    • index = idx_expireDate
    true false
    any featuredImage


    • access = public
    • returntype = any
    • notnull = false
    • length = 255
    true false
    any featuredImageURL


    • access = public
    • returntype = any
    • notnull = false
    • length = 255
    true false
    any HTMLDescription


    • access = public
    • returntype = any
    • notnull = false
    • length = 160
    true false
    any HTMLKeywords


    • access = public
    • returntype = any
    • notnull = false
    • length = 160
    true false
    any interceptorService


    • access = public
    • returntype = any
    • inject = coldbox:interceptorService
    • persistent = false
    true false
    any isDeleted


    • access = public
    • dbdefault = 0
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_deleted
    • sqltype = bit
    false true false
    any isPublished


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_published,idx_search,idx_publishedSlug
    true true false
    array linkedContent


    • linktable = cb_relatedContent
    • access = public
    • inverse = true
    • fieldtype = many-to-many
    • returntype = any
    • orderby = title
    • fkcolumn = FK_relatedContentID
    • inversejoincolumn = FK_contentID
    • cfc = contentbox.models.content.BaseContent
    • lazy = extra
    true false
    any markup


    • access = public
    • returntype = any
    • notnull = true
    • length = 100
    HTML true false
    date modifiedDate


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = timestamp
    • index = idx_modifiedDate
    true false
    any numberOfApprovedComments


    • access = public
    • returntype = any
    • formula = select count(*) from cb_comment comment where comment.FK_contentID=contentID and comment.isApproved = 1
    0 true false
    any numberOfChildren


    • access = public
    • returntype = any
    • formula = select count(*) from cb_content content where content.FK_parentID=contentID
    0 true false
    any numberOfComments


    • access = public
    • returntype = any
    • formula = select count(*) from cb_comment comment where comment.FK_contentID=contentID
    0 true false
    any numberOfHits


    • access = public
    • returntype = any
    • formula = select cs.hits from cb_stats cs where cs.FK_contentID=contentID
    0 true false
    any numberOfVersions


    • access = public
    • returntype = any
    • formula = select count(*) from cb_contentVersion cv where cv.FK_contentID=contentID
    0 true false
    any parent


    • access = public
    • fieldtype = many-to-one
    • returntype = any
    • fkcolumn = FK_parentID
    • cfc = contentbox.models.content.BaseContent
    • lazy = true
    true false
    any passwordProtection


    • access = public
    • returntype = any
    • notnull = false
    • index = idx_published
    • length = 100
    true false
    any publishedDate


    • access = public
    • returntype = any
    • notnull = false
    • ormtype = timestamp
    • index = idx_publishedDate
    true false
    array relatedContent


    • linktable = cb_relatedContent
    • access = public
    • fieldtype = many-to-many
    • returntype = any
    • cascade = all
    • orderby = title
    • fkcolumn = FK_contentID
    • inversejoincolumn = FK_relatedContentID
    • cfc = contentbox.models.content.BaseContent
    • lazy = extra
    true false
    any renderedContent


    • access = public
    • returntype = any
    • persistent = false
    true false
    any settingService


    • access = public
    • returntype = any
    • inject = id:settingService@cb
    • persistent = false
    true false
    any showInSearch


    • access = public
    • returntype = any
    • notnull = true
    • ormtype = boolean
    • index = idx_showInSearch
    true true false
    any slug


    • access = public
    • unique = true
    • returntype = any
    • notnull = true
    • index = idx_slug,idx_publishedSlug
    • length = 200
    true false
    any stats


    • access = public
    • fieldtype = one-to-one
    • returntype = any
    • cascade = all
    • fetch = join
    • notnull = true
    • cfc = contentbox.models.content.Stats
    • mappedby = relatedContent
    • lazy = true
    true false
    any title


    • access = public
    • returntype = any
    • notnull = true
    • index = idx_search
    • length = 200
    true false
    Constructor Summary
    init()
          Base constructor.
    Method Summary
    any addActiveContent(any activeContent)
    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)
    any addNewContentVersion(any content, [any changelog=''], any author)
         Add a new content version to save for this content object.
    any addPublishedTime(any hour, any minute)
         add published timestamp to property.
    any addRelatedContent(any relatedContent)
    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.
    any getActiveContent()
         Get the latest active content 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 getCachebox()
    string getCacheLastAccessTimeout()
    string getCacheLayout()
    string getCacheTimeout()
    string getCategories()
    any getCategoriesList()
         get flat categories list.
    string getCategoryService()
    string getChildren()
    string getComments()
    string getCommentSubscriptions()
    any getContent()
         Retrieves the latest content string from the latest version un-translated.
    string getContentID()
    string getContentService()
    string getContentType()
    string getContentVersions()
    string getContentVersionService()
    string getCreatedDate()
    string getCreator()
    string getCreatorEmail()
         Shorthand Creator email.
    string getCreatorName()
         Shorthand Creator name.
    any getCustomField(any key, [any defaultValue])
         Shortcut to get a custom field value.
    string getCustomFields()
    struct getCustomFieldsAsStruct()
         Get custom fields as a structure representation.
    string getCustomFieldService()
    string getDisplayExpireDate()
         Get formatted expireDate.
    string getDisplayPublishedDate()
         Get display publishedDate.
    string getExpireDate()
    string getExpireDateForEditor([boolean showTime='false'])
         Get display expireDate.
    string getFeaturedImage()
    string getFeaturedImageURL()
    string getHTMLDescription()
    string getHTMLKeywords()
    string getInterceptorService()
    string getIsDeleted()
    string getIsPublished()
    string getLinkedContent()
    string getMarkup()
    any getMemento(array slugCache='[runtime expression]', [any counter='0'], [boolean showAuthor='true'], [boolean showComments='true'], [boolean showCustomFields='true'], [boolean showContentVersions='true'], [boolean showParent='true'], [boolean showChildren='true'], [boolean showCategories='true'], [boolean showRelatedContent='true'], [boolean showStats='true'], [boolean showCommentSubscriptions='true'], [any excludes='activeContent,linkedContent,commentSubscriptions'], [array properties])
         Get a flat representation of this entry.
    string getModifiedDate()
    string getNumberOfApprovedComments()
    string getNumberOfChildren()
    string getNumberOfComments()
    numeric getNumberOfHits()
         Getter override to allow for null values.
    string getNumberOfVersions()
    string getParent()
    any getParentID()
         Get parent ID if set or empty if none.
    any getParentName()
         Get parent name or empty if none.
    string getPasswordProtection()
    string getPublishedDate()
    string getPublishedDateForEditor([boolean showTime='false'])
         Get display publishedDate.
    any getRecursiveSlug([any separator='/'])
         Get recursive slug paths to get ancestry, DEPRECATED.
    string getRelatedContent()
    string getRelatedContentIDs()
         Returns a list of active related content for this piece of content.
    string getRenderedContent()
    struct getResponseMemento(array slugCache='[runtime expression]', [boolean showAuthor='true'], [boolean showComments='true'], [boolean showCustomFields='true'], [boolean showParent='true'], [boolean showChildren='true'], [boolean showCategories='true'], [boolean showRelatedContent='true'], [any excludes=''], [array properties])
         Get a flat representation of this entry but for UI response format which.
    string getSettingService()
    string getShowInSearch()
    string getSlug()
    string getStats()
    string getTitle()
    boolean hasActiveContent([any activeContent])
    boolean hasCategories([any categories])
    boolean hasChild([any child])
    boolean hasComment([any comment])
    boolean hasCommentSubscription([any commentSubscription])
    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 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 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 loaded?.
    boolean isPasswordProtected()
         isPassword Protected.
    boolean isPublishedInFuture()
         Bit that denotes if the content has been published or not in the future.
    private any maxContentVersionChecks()
         Verify and rotate maximum content versions.
    BaseContent prepareForClone(any author, any original, any originalService, boolean publish, any originalSlugRoot, any newSlugRoot)
         Wipe primary key, and descendant keys, and prepare for cloning of entire hierarchies.
    boolean removeActiveContent(any activeContent)
    BaseContent removeAllCategories()
    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.
    any setActiveContent(array activeContent)
    any setAllowComments(any allowComments)
    any setCache(any cache)
    any setCachebox(any cachebox)
    any setCacheLastAccessTimeout(any cacheLastAccessTimeout)
    any setCacheLayout(any cacheLayout)
    any setCacheTimeout(any cacheTimeout)
    any setCategories(array categories)
    any setCategoryService(any categoryService)
    BaseContent setChildren(array children)
         Override the setChildren.
    BaseContent setComments(array comments)
         Override the setComments.
    any setCommentSubscriptions(array commentSubscriptions)
    any setContentService(any contentService)
    BaseContent setContentVersions(array contentVersions)
         Override the setContentVersions.
    any setContentVersionService(any contentVersionService)
    any setCreatedDate(date createdDate)
    any setCreator(any creator)
    BaseContent setCustomFields(array customFields)
         Override the setCustomFields.
    any setCustomFieldService(any customFieldService)
    any setExpireDate(any expireDate)
    any setFeaturedImage(any featuredImage)
    any setFeaturedImageURL(any featuredImageURL)
    any setHTMLDescription(any HTMLDescription)
    any setHTMLKeywords(any HTMLKeywords)
    any setInterceptorService(any interceptorService)
    any setIsDeleted(any isDeleted)
    any setIsPublished(any isPublished)
    any setLinkedContent(array linkedContent)
    any setMarkup(any markup)
    any setModifiedDate(date modifiedDate)
    any setNumberOfApprovedComments(any numberOfApprovedComments)
    any setNumberOfChildren(any numberOfChildren)
    any setNumberOfComments(any numberOfComments)
    any setNumberOfHits(any numberOfHits)
    any setNumberOfVersions(any numberOfVersions)
    any setParent(any 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 setSlug(any slug)
    any setStats(any stats)
    any setTitle(any title)
     
    Methods inherited from class contentbox.models.BaseEntityMethods
    getBaseMemento, getDisplayCreatedDate, getDisplayModifiedDate, preInsert, preUpdate
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Base constructor


    Property Detail

    activeContent

    property array activeContent

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - save-update
    fkcolumn - FK_contentID
    serializable - true
    cfc - contentbox.models.content.ContentVersion
    where - isActive = 1
    lazy - extra

    allowComments

    property any allowComments = [true]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    serializable - true

    cache

    property any cache = [true]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_cache
    serializable - true

    cachebox

    property any cachebox

    Attributes:
    access - public
    required - false
    returntype - any
    inject - cachebox
    persistent - false
    serializable - true

    cacheLastAccessTimeout

    property any cacheLastAccessTimeout = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - integer
    index - idx_cachelastaccesstimeout
    serializable - true

    cacheLayout

    property any cacheLayout = [true]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_cachelayout
    serializable - true

    cacheTimeout

    property any cacheTimeout = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - integer
    index - idx_cachetimeout
    serializable - true

    categories

    property array categories

    Attributes:
    linktable - cb_contentCategories
    access - public
    required - false
    fieldtype - many-to-many
    returntype - any
    cascade - all
    orderby - category
    fkcolumn - FK_contentID
    serializable - true
    inversejoincolumn - FK_categoryID
    cfc - contentbox.models.content.Category
    lazy - extra

    categoryService

    property any categoryService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - categoryService@cb
    persistent - false
    serializable - true

    children

    property array children

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    orderby - createdDate
    batchsize - 25
    singularname - child
    fkcolumn - FK_parentID
    serializable - true
    cfc - contentbox.models.content.BaseContent
    lazy - extra

    comments

    property array comments

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    orderby - createdDate
    batchsize - 25
    singularname - comment
    fkcolumn - FK_contentID
    serializable - true
    cfc - contentbox.models.comments.Comment
    lazy - extra

    commentSubscriptions

    property array commentSubscriptions

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    batchsize - 25
    singularname - commentSubscription
    fkcolumn - FK_contentID
    serializable - true
    cfc - contentbox.models.subscriptions.CommentSubscription
    lazy - extra

    contentID

    property any contentID

    Attributes:
    access - public
    required - false
    fieldtype - id
    returntype - any
    params - { allocationSize = 1, sequence = 'contentID_seq' }
    notnull - true
    generator - native
    serializable - true
    setter - no

    contentService

    property any contentService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - contentService@cb
    persistent - false
    serializable - true

    contentType

    property any contentType

    Attributes:
    access - public
    required - false
    insert - false
    returntype - any
    update - false
    index - idx_discriminator,idx_published
    serializable - true
    setter - no

    contentVersions

    property array contentVersions

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    batchsize - 25
    singularname - contentVersion
    fkcolumn - FK_contentID
    serializable - true
    cfc - contentbox.models.content.ContentVersion
    lazy - extra

    contentVersionService

    property any contentVersionService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - contentVersionService@cb
    persistent - false
    serializable - true

    createdDate

    property date createdDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - timestamp
    update - false
    index - idx_createDate
    serializable - true

    creator

    property any creator

    Attributes:
    access - public
    required - false
    fieldtype - many-to-one
    returntype - any
    fetch - join
    notnull - true
    fkcolumn - FK_authorID
    serializable - true
    cfc - contentbox.models.security.Author
    lazy - true

    customFields

    property array customFields

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    batchsize - 25
    singularname - customField
    fkcolumn - FK_contentID
    serializable - true
    cfc - contentbox.models.content.CustomField
    lazy - extra

    customFieldService

    property any customFieldService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - customFieldService@cb
    persistent - false
    serializable - true

    expireDate

    property any expireDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - timestamp
    index - idx_expireDate
    serializable - true

    featuredImage

    property any featuredImage

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    length - 255
    serializable - true

    featuredImageURL

    property any featuredImageURL

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    length - 255
    serializable - true

    HTMLDescription

    property any HTMLDescription

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    length - 160
    serializable - true

    HTMLKeywords

    property any HTMLKeywords

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    length - 160
    serializable - true

    interceptorService

    property any interceptorService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - coldbox:interceptorService
    persistent - false
    serializable - true

    isDeleted

    property any isDeleted = [false]

    Attributes:
    access - public
    required - false
    dbdefault - 0
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_deleted
    serializable - true
    sqltype - bit

    isPublished

    property any isPublished = [true]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_published,idx_search,idx_publishedSlug
    serializable - true

    linkedContent

    property array linkedContent

    Attributes:
    linktable - cb_relatedContent
    access - public
    required - false
    inverse - true
    fieldtype - many-to-many
    returntype - any
    orderby - title
    fkcolumn - FK_relatedContentID
    serializable - true
    inversejoincolumn - FK_contentID
    cfc - contentbox.models.content.BaseContent
    lazy - extra

    markup

    property any markup = [HTML]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    length - 100
    serializable - true

    modifiedDate

    property date modifiedDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - timestamp
    index - idx_modifiedDate
    serializable - true

    numberOfApprovedComments

    property any numberOfApprovedComments = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_comment comment where comment.FK_contentID=contentID and comment.isApproved = 1
    serializable - true

    numberOfChildren

    property any numberOfChildren = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_content content where content.FK_parentID=contentID
    serializable - true

    numberOfComments

    property any numberOfComments = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_comment comment where comment.FK_contentID=contentID
    serializable - true

    numberOfHits

    property any numberOfHits = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select cs.hits from cb_stats cs where cs.FK_contentID=contentID
    serializable - true

    numberOfVersions

    property any numberOfVersions = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_contentVersion cv where cv.FK_contentID=contentID
    serializable - true

    parent

    property any parent

    Attributes:
    access - public
    required - false
    fieldtype - many-to-one
    returntype - any
    fkcolumn - FK_parentID
    serializable - true
    cfc - contentbox.models.content.BaseContent
    lazy - true

    passwordProtection

    property any passwordProtection

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    index - idx_published
    length - 100
    serializable - true

    publishedDate

    property any publishedDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - false
    ormtype - timestamp
    index - idx_publishedDate
    serializable - true

    relatedContent

    property array relatedContent

    Attributes:
    linktable - cb_relatedContent
    access - public
    required - false
    fieldtype - many-to-many
    returntype - any
    cascade - all
    orderby - title
    fkcolumn - FK_contentID
    serializable - true
    inversejoincolumn - FK_relatedContentID
    cfc - contentbox.models.content.BaseContent
    lazy - extra

    renderedContent

    property any renderedContent

    Attributes:
    access - public
    required - false
    returntype - any
    persistent - false
    serializable - true

    settingService

    property any settingService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - id:settingService@cb
    persistent - false
    serializable - true

    showInSearch

    property any showInSearch = [true]

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - boolean
    index - idx_showInSearch
    serializable - true

    slug

    property any slug

    Attributes:
    access - public
    unique - true
    required - false
    returntype - any
    notnull - true
    index - idx_slug,idx_publishedSlug
    length - 200
    serializable - true

    stats

    property any stats

    Attributes:
    access - public
    required - false
    fieldtype - one-to-one
    returntype - any
    cascade - all
    fetch - join
    notnull - true
    serializable - true
    cfc - contentbox.models.content.Stats
    mappedby - relatedContent
    lazy - true

    title

    property any title

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    index - idx_search
    length - 200
    serializable - true

    Method Detail

    addActiveContent

    public any addActiveContent(any activeContent)

    Parameters:
    activeContent

    addCategories

    public BaseContent addCategories(any category)

    Only adds it if not found in content object

    Parameters:
    category

    addChild

    public any addChild(any child)

    Parameters:
    child

    addComment

    public any addComment(any comment)

    Parameters:
    comment

    addCommentSubscription

    public any addCommentSubscription(any commentSubscription)

    Parameters:
    commentSubscription

    addContentVersion

    public any addContentVersion(any contentVersion)

    Parameters:
    contentVersion

    addCustomField

    public any addCustomField(any customField)

    Parameters:
    customField

    addExpiredTime

    public any addExpiredTime(any hour, any minute)

    add expired timestamp to property

    Parameters:
    hour
    minute

    addJoinedExpiredTime

    public any addJoinedExpiredTime(string timeString)

    add expired timestamp to property

    Parameters:
    timeString - The joined time string (e.g., 12:00)

    addJoinedPublishedTime

    public any addJoinedPublishedTime(string timeString)

    add published timestamp to property

    Parameters:
    timeString - The joined time string (e.g., 12:00)

    addLinkedContent

    public any addLinkedContent(any linkedContent)

    Parameters:
    linkedContent

    addNewContentVersion

    public any addNewContentVersion(any content, [any changelog=''], any author)

    Add a new content version to save for this content object

    Parameters:
    content
    changelog
    author

    addPublishedTime

    public any addPublishedTime(any hour, any minute)

    add published timestamp to property

    Parameters:
    hour
    minute

    addRelatedContent

    public any addRelatedContent(any relatedContent)

    Parameters:
    relatedContent

    buildContentCacheKey

    public string buildContentCacheKey()

    Build content cache keys according to sent content object


    canCacheContent

    public boolean canCacheContent()

    Verify we can do content caching on this content object using global and local rules


    getActiveContent

    public any getActiveContent()

    Get the latest active content object, empty new one if none assigned


    getAllowComments

    public string getAllowComments()


    getAuthor

    public any getAuthor()

    Shorthand Author from latest version or null if any yet


    getAuthorEmail

    public string getAuthorEmail()

    Shorthand Author email from latest version


    getAuthorName

    public string getAuthorName()

    Shorthand Author name from latest version


    getCache

    public string getCache()


    getCachebox

    public string getCachebox()


    getCacheLastAccessTimeout

    public string getCacheLastAccessTimeout()


    getCacheLayout

    public string getCacheLayout()


    getCacheTimeout

    public string getCacheTimeout()


    getCategories

    public string getCategories()


    getCategoriesList

    public any getCategoriesList()

    get flat categories list


    getCategoryService

    public string getCategoryService()


    getChildren

    public string getChildren()


    getComments

    public string getComments()


    getCommentSubscriptions

    public string getCommentSubscriptions()


    getContent

    public any getContent()

    Retrieves the latest content string from the latest version un-translated


    getContentID

    public string getContentID()


    getContentService

    public string getContentService()


    getContentType

    public string getContentType()


    getContentVersions

    public string getContentVersions()


    getContentVersionService

    public string getContentVersionService()


    getCreatedDate

    public string getCreatedDate()


    getCreator

    public string getCreator()


    getCreatorEmail

    public string getCreatorEmail()

    Shorthand Creator email


    getCreatorName

    public string getCreatorName()

    Shorthand Creator name


    getCustomField

    public any getCustomField(any key, [any defaultValue])

    Shortcut to get a custom field value

    Parameters:
    key - The custom field key to get
    defaultValue - The default value if the key is not found.

    getCustomFields

    public string getCustomFields()


    getCustomFieldsAsStruct

    public struct getCustomFieldsAsStruct()

    Get custom fields as a structure representation


    getCustomFieldService

    public string getCustomFieldService()


    getDisplayExpireDate

    public string getDisplayExpireDate()

    Get formatted expireDate


    getDisplayPublishedDate

    public string getDisplayPublishedDate()

    Get display publishedDate


    getExpireDate

    public string getExpireDate()


    getExpireDateForEditor

    public string getExpireDateForEditor([boolean showTime='false'])

    Get display expireDate

    Parameters:
    showTime

    getFeaturedImage

    public string getFeaturedImage()


    getFeaturedImageURL

    public string getFeaturedImageURL()


    getHTMLDescription

    public string getHTMLDescription()


    getHTMLKeywords

    public string getHTMLKeywords()


    getInterceptorService

    public string getInterceptorService()


    getIsDeleted

    public string getIsDeleted()


    getIsPublished

    public string getIsPublished()


    getLinkedContent

    public string getLinkedContent()


    getMarkup

    public string getMarkup()


    getMemento

    public any getMemento(array slugCache='[runtime expression]', [any counter='0'], [boolean showAuthor='true'], [boolean showComments='true'], [boolean showCustomFields='true'], [boolean showContentVersions='true'], [boolean showParent='true'], [boolean showChildren='true'], [boolean showCategories='true'], [boolean showRelatedContent='true'], [boolean showStats='true'], [boolean showCommentSubscriptions='true'], [any excludes='activeContent,linkedContent,commentSubscriptions'], [array properties])

    Get a flat representation of this entry

    Parameters:
    slugCache - Cache of slugs to prevent infinite recursions
    counter - true
    showAuthor - Show author in memento or not
    showComments - Show comments in memento or not
    showCustomFields - Show comments in memento or not
    showContentVersions - Show content versions in memento or not
    showParent - Show parent in memento or not
    showChildren - Show children in memento or not
    showCategories - Show categories in memento or not
    showRelatedContent - Show related Content in memento or not
    showStats - Show stats in memento or not
    showCommentSubscriptions - Show comment subscriptions or not
    excludes - Excludes
    properties - Additional properties to incorporate in the memento

    getModifiedDate

    public string getModifiedDate()


    getNumberOfApprovedComments

    public string getNumberOfApprovedComments()


    getNumberOfChildren

    public string getNumberOfChildren()


    getNumberOfComments

    public string getNumberOfComments()


    getNumberOfHits

    public numeric getNumberOfHits()

    Getter override to allow for null values


    getNumberOfVersions

    public string getNumberOfVersions()


    getParent

    public string getParent()


    getParentID

    public any getParentID()

    Get parent ID if set or empty if none


    getParentName

    public any getParentName()

    Get parent name or empty if none


    getPasswordProtection

    public string getPasswordProtection()


    getPublishedDate

    public string getPublishedDate()


    getPublishedDateForEditor

    public string getPublishedDateForEditor([boolean showTime='false'])

    Get display publishedDate

    Parameters:
    showTime

    getRecursiveSlug

    public any getRecursiveSlug([any separator='/'])

    Get recursive slug paths to get ancestry, DEPRECATED.

    Parameters:
    separator

    getRelatedContent

    public string getRelatedContent()


    getRelatedContentIDs

    public string getRelatedContentIDs()

    Returns a list of active related content for this piece of content


    getRenderedContent

    public string getRenderedContent()


    getResponseMemento

    public struct getResponseMemento(array slugCache='[runtime expression]', [boolean showAuthor='true'], [boolean showComments='true'], [boolean showCustomFields='true'], [boolean showParent='true'], [boolean showChildren='true'], [boolean showCategories='true'], [boolean showRelatedContent='true'], [any excludes=''], [array properties])

    Get a flat representation of this entry but for UI response format which restricts the data being generated.

    Parameters:
    slugCache - Cache of slugs to prevent infinite recursions
    showAuthor
    showComments - Show comments in memento or not
    showCustomFields - Show comments in memento or not
    showParent - Show parent in memento or not
    showChildren - Show children in memento or not
    showCategories - Show categories in memento or not
    showRelatedContent - Show related Content in memento or not
    excludes - Excludes
    properties - Additional properties to incorporate in the memento

    getSettingService

    public string getSettingService()


    getShowInSearch

    public string getShowInSearch()


    getSlug

    public string getSlug()


    getStats

    public string getStats()


    getTitle

    public string getTitle()


    hasActiveContent

    public boolean hasActiveContent([any activeContent])

    Parameters:
    activeContent

    hasCategories

    public boolean hasCategories([any categories])

    Parameters:
    categories

    hasChild

    public boolean hasChild([any child])

    Parameters:
    child

    hasComment

    public boolean hasComment([any comment])

    Parameters:
    comment

    hasCommentSubscription

    public boolean hasCommentSubscription([any commentSubscription])

    Parameters:
    commentSubscription

    hasContentVersion

    public boolean hasContentVersion([any contentVersion])

    Parameters:
    contentVersion

    hasCreator

    public boolean hasCreator([any creator])

    Parameters:
    creator

    hasCustomField

    public boolean hasCustomField([any customField])

    Parameters:
    customField

    hasLinkedContent

    public boolean hasLinkedContent([any linkedContent])

    Parameters:
    linkedContent

    hasParent

    public boolean hasParent([any parent])

    Parameters:
    parent

    hasRelatedContent

    public boolean hasRelatedContent([any relatedContent])

    Parameters:
    relatedContent

    hasStats

    public boolean hasStats([any stats])

    Parameters:
    stats

    inflateCustomFields

    public any inflateCustomFields(numeric fieldCount, struct memento)

    Inflate custom fields from the incoming count and memento structure

    Parameters:
    fieldCount
    memento

    inflateRelatedContent

    public BaseContent inflateRelatedContent(any relatedContent)

    Inflates from comma-delimited list (or array) of id's

    Parameters:
    relatedContent - The list or array of relatedContent ids

    isContentPublished

    public boolean isContentPublished()

    Bit that denotes if the content has been published or not


    isExpired

    public 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


    isLoaded

    public boolean isLoaded()

    is loaded?

    Overrides:
    isLoaded in class BaseEntityMethods

    isPasswordProtected

    public boolean isPasswordProtected()

    isPassword Protected


    isPublishedInFuture

    public boolean isPublishedInFuture()

    Bit that denotes if the content has been published or not in the future


    maxContentVersionChecks

    private any maxContentVersionChecks()

    Verify and rotate maximum content versions


    prepareForClone

    public BaseContent prepareForClone(any author, any original, any originalService, boolean publish, any originalSlugRoot, any newSlugRoot)

    Wipe primary key, and descendant keys, and prepare for cloning of entire hierarchies

    Parameters:
    author - The author doing the cloning
    original - The original content object that will be cloned into this content object
    originalService - The ContentBox content service object
    publish - Publish pages or leave as drafts
    originalSlugRoot - The original slug that will be replaced in all cloned content
    newSlugRoot - The new slug root that will be replaced in all cloned content

    removeActiveContent

    public boolean removeActiveContent(any activeContent)

    Parameters:
    activeContent

    removeAllCategories

    public BaseContent removeAllCategories()


    removeAllLinkedContent

    public BaseContent removeAllLinkedContent()


    removeCategories

    public BaseContent removeCategories(any category)

    Remove only if it's found in the content object

    Parameters:
    category

    removeChild

    public boolean removeChild(any child)

    Parameters:
    child

    removeComment

    public boolean removeComment(any comment)

    Parameters:
    comment

    removeCommentSubscription

    public boolean removeCommentSubscription(any commentSubscription)

    Parameters:
    commentSubscription

    removeContentVersion

    public boolean removeContentVersion(any contentVersion)

    Parameters:
    contentVersion

    removeCustomField

    public boolean removeCustomField(any customField)

    Parameters:
    customField

    removeLinkedContent

    public boolean removeLinkedContent(any linkedContent)

    Parameters:
    linkedContent

    removeRelatedContent

    public boolean removeRelatedContent(any relatedContent)

    Parameters:
    relatedContent

    renderContent

    public any renderContent()

    Render content out using translations, caching, etc.


    renderContentSilent

    public any renderContentSilent([any content='[runtime expression]'])

    Renders the content silently so no caching, or extra fluff is done, just content translation rendering.

    Parameters:
    content - The content markup to translate, by default it uses the active content version's content

    setActiveContent

    public any setActiveContent(array activeContent)

    Parameters:
    activeContent

    setAllowComments

    public any setAllowComments(any allowComments)

    Parameters:
    allowComments

    setCache

    public any setCache(any cache)

    Parameters:
    cache

    setCachebox

    public any setCachebox(any cachebox)

    Parameters:
    cachebox

    setCacheLastAccessTimeout

    public any setCacheLastAccessTimeout(any cacheLastAccessTimeout)

    Parameters:
    cacheLastAccessTimeout

    setCacheLayout

    public any setCacheLayout(any cacheLayout)

    Parameters:
    cacheLayout

    setCacheTimeout

    public any setCacheTimeout(any cacheTimeout)

    Parameters:
    cacheTimeout

    setCategories

    public any setCategories(array categories)

    Parameters:
    categories

    setCategoryService

    public any setCategoryService(any categoryService)

    Parameters:
    categoryService

    setChildren

    public BaseContent setChildren(array children)

    Override the setChildren

    Parameters:
    children

    setComments

    public BaseContent setComments(array comments)

    Override the setComments

    Parameters:
    comments

    setCommentSubscriptions

    public any setCommentSubscriptions(array commentSubscriptions)

    Parameters:
    commentSubscriptions

    setContentService

    public any setContentService(any contentService)

    Parameters:
    contentService

    setContentVersions

    public BaseContent setContentVersions(array contentVersions)

    Override the setContentVersions

    Parameters:
    contentVersions

    setContentVersionService

    public any setContentVersionService(any contentVersionService)

    Parameters:
    contentVersionService

    setCreatedDate

    public any setCreatedDate(date createdDate)

    Parameters:
    createdDate

    setCreator

    public any setCreator(any creator)

    Parameters:
    creator

    setCustomFields

    public BaseContent setCustomFields(array customFields)

    Override the setCustomFields

    Parameters:
    customFields

    setCustomFieldService

    public any setCustomFieldService(any customFieldService)

    Parameters:
    customFieldService

    setExpireDate

    public any setExpireDate(any expireDate)

    Parameters:
    expireDate

    setFeaturedImage

    public any setFeaturedImage(any featuredImage)

    Parameters:
    featuredImage

    setFeaturedImageURL

    public any setFeaturedImageURL(any featuredImageURL)

    Parameters:
    featuredImageURL

    setHTMLDescription

    public any setHTMLDescription(any HTMLDescription)

    Parameters:
    HTMLDescription

    setHTMLKeywords

    public any setHTMLKeywords(any HTMLKeywords)

    Parameters:
    HTMLKeywords

    setInterceptorService

    public any setInterceptorService(any interceptorService)

    Parameters:
    interceptorService

    setIsDeleted

    public any setIsDeleted(any isDeleted)

    Parameters:
    isDeleted

    setIsPublished

    public any setIsPublished(any isPublished)

    Parameters:
    isPublished

    setLinkedContent

    public any setLinkedContent(array linkedContent)

    Parameters:
    linkedContent

    setMarkup

    public any setMarkup(any markup)

    Parameters:
    markup

    setModifiedDate

    public any setModifiedDate(date modifiedDate)

    Parameters:
    modifiedDate

    setNumberOfApprovedComments

    public any setNumberOfApprovedComments(any numberOfApprovedComments)

    Parameters:
    numberOfApprovedComments

    setNumberOfChildren

    public any setNumberOfChildren(any numberOfChildren)

    Parameters:
    numberOfChildren

    setNumberOfComments

    public any setNumberOfComments(any numberOfComments)

    Parameters:
    numberOfComments

    setNumberOfHits

    public any setNumberOfHits(any numberOfHits)

    Parameters:
    numberOfHits

    setNumberOfVersions

    public any setNumberOfVersions(any numberOfVersions)

    Parameters:
    numberOfVersions

    setParent

    public any setParent(any parent)

    Parameters:
    parent

    setPasswordProtection

    public any setPasswordProtection(any passwordProtection)

    Parameters:
    passwordProtection

    setPublishedDate

    public any setPublishedDate(any publishedDate)

    Parameters:
    publishedDate

    setRelatedContent

    public BaseContent setRelatedContent(array relatedContent)

    Override the setRelatedContent

    Parameters:
    relatedContent - The related content to set

    setRenderedContent

    public any setRenderedContent(any renderedContent)

    Parameters:
    renderedContent

    setSettingService

    public any setSettingService(any settingService)

    Parameters:
    settingService

    setShowInSearch

    public any setShowInSearch(any showInSearch)

    Parameters:
    showInSearch

    setSlug

    public any setSlug(any slug)

    Parameters:
    slug

    setStats

    public any setStats(any stats)

    Parameters:
    stats

    setTitle

    public any setTitle(any title)

    Parameters:
    title