contentbox.models.content

Class ContentTemplate

lucee.Component
    extended by contentbox.models.BaseEntityMethods
      extended by contentbox.models.content.ContentTemplate

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- A content template for a base content item

Class Attributes:
  • entityname : cbContentTemplate
  •  
  • cacheuse : read-write
  •  
  • table : cb_contentTemplate
  •  
  • synchronized : false
  •  
  • cachename : cbContentTemplate
  •  
  • accessors : false
  •  
  • persistent : true
  •  
    Property Summary
    type property default serializable required
    any assignedContentItems


    • access = public
    • returntype = any
    • formula = select count(*) from cb_content cbc2 WHERE cbc2.FK_contentTemplateID=templateID or cbc2.FK_childContentTemplateID=templateID
    • ormtype = integer
    0 true false
    any contentTemplateService


    • access = public
    • returntype = any
    • inject = provider:ContentTemplateService@contentbox
    • persistent = false
    true false
    any contentType


    • access = public
    • returntype = any
    • column = contentType
    • index = idx_templateContentType
    • length = 50
    true false
    date createdDate
          --------------------------------------------------------------------------.

    • access = public
    • returntype = any
    • column = createdDate
    • notnull = true
    • ormtype = timestamp
    • update = false
    true false
    any creator


    • access = public
    • insert = true
    • fieldtype = many-to-one
    • returntype = any
    • notnull = true
    • update = false
    • fkcolumn = FK_authorID
    • cfc = contentbox.models.security.Author
    true false
    any definition


    • access = public
    • returntype = any
    • column = definition
    • notnull = true
    • ormtype = text
    {} true false
    any description


    • access = public
    • returntype = any
    • column = description
    • notnull = false
    • length = 1000
    true false
    any isDeleted


    • access = public
    • returntype = any
    • column = isDeleted
    • notnull = true
    • ormtype = boolean
    false true false
    any isGlobal


    • access = public
    • returntype = any
    • column = isGlobal
    • notnull = true
    • ormtype = boolean
    false true false
    date modifiedDate


    • access = public
    • returntype = any
    • column = modifiedDate
    • notnull = true
    • ormtype = timestamp
    true false
    any name


    • access = public
    • returntype = any
    • column = name
    • notnull = true
    • length = 225
    true false
    any schema


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


    • access = public
    • insert = true
    • fieldtype = many-to-one
    • returntype = any
    • fetch = join
    • notnull = true
    • update = false
    • fkcolumn = FK_siteID
    • cfc = contentbox.models.system.Site
    • lazy = true
    true false
    any templateID
          --------------------------------------------------------------------------.

    • access = public
    • fieldtype = id
    • returntype = any
    • column = templateID
    • ormtype = string
    • update = false
    • generator = uuid
    • length = 36
    true false
    Constructor Summary
    init()
    Method Summary
    string getAssignedContentItems()
    string getContentTemplateService()
    string getContentType()
    string getCreatedDate()
    string getCreator()
    any getDefinition()
         Overload getter for definition to deal with JSON conversion.
    string getDescription()
    string getIsDeleted()
    string getIsGlobal()
    string getModifiedDate()
    string getName()
    string getSchema()
    string getSite()
    string getTemplateID()
    boolean hasCreator([any creator])
    boolean hasSite([any site])
    boolean isGlobalUniqueInSite()
         UDF validation method to test for global uniqueness of a Content Template.
    boolean isNameUniqueInSite([any value='[runtime expression]'])
         Determines whether a template with a given name is unique within a site.
    any setAssignedContentItems(any assignedContentItems)
    any setContentTemplateService(any contentTemplateService)
    any setContentType(any contentType)
    any setCreatedDate(date createdDate)
    any setCreator(any creator)
    any setDefinition([any definition])
         Overload setter for definition to deal with JSON conversion.
    any setDescription(any description)
    any setIsDeleted(any isDeleted)
    any setIsGlobal(any isGlobal)
    any setModifiedDate(date modifiedDate)
    any setName(any name)
    any setSchema(any schema)
    any setSite(any site)
    any setTemplateID(any templateID)
     
    Methods inherited from class contentbox.models.BaseEntityMethods
    appendToMemento, appendToMementoProfile, arrayWrap, getDisplayCreatedDate, getDisplayModifiedDate, getEntityName, getId, includeMixin, isLoaded, preInsert, preUpdate
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()


    Property Detail

    assignedContentItems

    property any assignedContentItems = [0]

    Attributes:
    access - public
    required - false
    returntype - any
    formula - select count(*) from cb_content cbc2 WHERE cbc2.FK_contentTemplateID=templateID or cbc2.FK_childContentTemplateID=templateID
    ormtype - integer
    serializable - true

    contentTemplateService

    property any contentTemplateService

    Attributes:
    access - public
    required - false
    returntype - any
    inject - provider:ContentTemplateService@contentbox
    persistent - false
    serializable - true

    contentType

    property any contentType

    Attributes:
    access - public
    required - false
    returntype - any
    column - contentType
    index - idx_templateContentType
    length - 50
    serializable - true

    createdDate

    property date createdDate

    -------------------------------------------------------------------------- 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.

    Attributes:
    access - public
    required - false
    returntype - any
    column - createdDate
    notnull - true
    ormtype - timestamp
    update - false
    serializable - true

    creator

    property any creator

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

    definition

    property any definition = [{}]

    Attributes:
    access - public
    required - false
    returntype - any
    column - definition
    notnull - true
    ormtype - text
    serializable - true

    description

    property any description

    Attributes:
    access - public
    required - false
    returntype - any
    column - description
    notnull - false
    length - 1000
    serializable - true

    isDeleted

    property any isDeleted = [false]

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

    isGlobal

    property any isGlobal = [false]

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

    modifiedDate

    property date modifiedDate

    Attributes:
    access - public
    required - false
    returntype - any
    column - modifiedDate
    notnull - true
    ormtype - timestamp
    serializable - true

    name

    property any name

    Attributes:
    access - public
    required - false
    returntype - any
    column - name
    notnull - true
    length - 225
    serializable - true

    schema

    property any schema

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

    site

    property any site

    Attributes:
    access - public
    required - false
    insert - true
    fieldtype - many-to-one
    returntype - any
    fetch - join
    notnull - true
    update - false
    fkcolumn - FK_siteID
    serializable - true
    cfc - contentbox.models.system.Site
    lazy - true

    templateID

    property any templateID

    -------------------------------------------------------------------------- PROPERTIES --------------------------------------------------------------------------

    Attributes:
    access - public
    required - false
    fieldtype - id
    returntype - any
    column - templateID
    ormtype - string
    update - false
    generator - uuid
    length - 36
    serializable - true

    Method Detail

    getAssignedContentItems

    public string getAssignedContentItems()


    getContentTemplateService

    public string getContentTemplateService()


    getContentType

    public string getContentType()


    getCreatedDate

    public string getCreatedDate()


    getCreator

    public string getCreator()


    getDefinition

    public any getDefinition()

    Overload getter for definition to deal with JSON conversion


    getDescription

    public string getDescription()


    getIsDeleted

    public string getIsDeleted()


    getIsGlobal

    public string getIsGlobal()


    getModifiedDate

    public string getModifiedDate()


    getName

    public string getName()


    getSchema

    public string getSchema()


    getSite

    public string getSite()


    getTemplateID

    public string getTemplateID()


    hasCreator

    public boolean hasCreator([any creator])

    Parameters:
    creator

    hasSite

    public boolean hasSite([any site])

    Parameters:
    site

    isGlobalUniqueInSite

    public boolean isGlobalUniqueInSite()

    UDF validation method to test for global uniqueness of a Content Template


    isNameUniqueInSite

    public boolean isNameUniqueInSite([any value='[runtime expression]'])

    Determines whether a template with a given name is unique within a site

    Parameters:
    value - The name to test for uniqueness

    setAssignedContentItems

    public any setAssignedContentItems(any assignedContentItems)

    Parameters:
    assignedContentItems

    setContentTemplateService

    public any setContentTemplateService(any contentTemplateService)

    Parameters:
    contentTemplateService

    setContentType

    public any setContentType(any contentType)

    Parameters:
    contentType

    setCreatedDate

    public any setCreatedDate(date createdDate)

    Parameters:
    createdDate

    setCreator

    public any setCreator(any creator)

    Parameters:
    creator

    setDefinition

    public any setDefinition([any definition])

    Overload setter for definition to deal with JSON conversion

    Parameters:
    definition

    setDescription

    public any setDescription(any description)

    Parameters:
    description

    setIsDeleted

    public any setIsDeleted(any isDeleted)

    Parameters:
    isDeleted

    setIsGlobal

    public any setIsGlobal(any isGlobal)

    Parameters:
    isGlobal

    setModifiedDate

    public any setModifiedDate(date modifiedDate)

    Parameters:
    modifiedDate

    setName

    public any setName(any name)

    Parameters:
    name

    setSchema

    public any setSchema(any schema)

    Parameters:
    schema

    setSite

    public any setSite(any site)

    Parameters:
    site

    setTemplateID

    public any setTemplateID(any templateID)

    Parameters:
    templateID