contentbox.models.menu

Class Menu

lucee.Component
    extended by contentbox.models.BaseEntityMethods
      extended by contentbox.models.BaseEntity
        extended by contentbox.models.menu.Menu

ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Core Menu Entity

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


    • access = public
    • returntype = any
    • inject = provider:entityservice
    • persistent = false
    true false
    date createdDate


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


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


    • access = public
    • returntype = any
    • column = listClass
    • ormtype = string
    • length = 160
    true false
    any listType


    • access = public
    • returntype = any
    • column = listType
    • ormtype = string
    • length = 20
    ul true false
    any menuClass


    • access = public
    • returntype = any
    • column = menuClass
    • ormtype = string
    • length = 160
    true false
    any menuID


    • access = public
    • fieldtype = id
    • returntype = any
    • column = menuID
    • ormtype = string
    • update = false
    • generator = uuid
    • length = 36
    true false
    any menuItemService


    • access = public
    • returntype = any
    • inject = provider:menuItemService@contentbox
    • persistent = false
    true false
    array menuItems


    • access = public
    • inverse = true
    • fieldtype = one-to-many
    • returntype = any
    • cascade = all-delete-orphan
    • singularname = menuItem
    • fkcolumn = FK_menuID
    • cfc = contentbox.models.menu.item.BaseMenuItem
    • lazy = extra
    true false
    any menuService


    • access = public
    • returntype = any
    • inject = provider:menuService@contentbox
    • persistent = false
    true false
    date modifiedDate


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


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


    • access = public
    • returntype = any
    • column = slug
    • notnull = true
    • ormtype = string
    • index = idx_menuslug
    • length = 200
    true false
    any title


    • access = public
    • returntype = any
    • column = title
    • notnull = true
    • ormtype = string
    • index = idx_menutitle
    • length = 200
    true false
    Constructor Summary
    init()
          constructor.
    Method Summary
    Menu addMenuItem(any menuItem)
    private array createMenuItems(array rawData)
         Recursive function to build menu items hierarchy from raw data.
    string getListClass()
    string getListType()
    string getMenuClass()
    string getMenuID()
    string getMenuItemService()
    string getMenuItems()
    string getMenuService()
    string getORMService()
    array getRootMenuItems()
         Retrieves root menu items (only items with no parents).
    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 getTitle()
    boolean hasMenuItem([any menuItem])
    boolean hasSite([any site])
    array populateMenuItems(array rawData)
         Creates menu items from raw data objects and attaches them to this menu.
    boolean removeMenuItem(any menuItem)
    any setListClass(any listClass)
    any setListType(any listType)
    any setMenuClass(any menuClass)
    any setMenuID(any menuID)
    any setMenuItemService(any menuItemService)
    Menu setMenuItems(array menuItems)
    any setMenuService(any menuService)
    any setORMService(any ORMService)
    any setSite(any site)
    any setSlug(any slug)
    any setTitle(any title)
     
    Methods inherited from class contentbox.models.BaseEntity
    getCreatedDate, getIsDeleted, getModifiedDate, setCreatedDate, setIsDeleted, setModifiedDate
     
    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()

    constructor


    Property Detail

    ORMService

    property any ORMService

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

    createdDate

    property date createdDate

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

    isDeleted

    property any isDeleted = [false]

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

    listClass

    property any listClass

    Attributes:
    access - public
    required - false
    returntype - any
    column - listClass
    ormtype - string
    length - 160
    serializable - true

    listType

    property any listType = [ul]

    Attributes:
    access - public
    required - false
    returntype - any
    column - listType
    ormtype - string
    length - 20
    serializable - true

    menuClass

    property any menuClass

    Attributes:
    access - public
    required - false
    returntype - any
    column - menuClass
    ormtype - string
    length - 160
    serializable - true

    menuID

    property any menuID

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

    menuItemService

    property any menuItemService

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

    menuItems

    property array menuItems

    Attributes:
    access - public
    required - false
    inverse - true
    fieldtype - one-to-many
    returntype - any
    cascade - all-delete-orphan
    singularname - menuItem
    fkcolumn - FK_menuID
    serializable - true
    cfc - contentbox.models.menu.item.BaseMenuItem
    lazy - extra

    menuService

    property any menuService

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

    modifiedDate

    property date modifiedDate

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

    site

    property any site

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

    slug

    property any slug

    Attributes:
    access - public
    required - false
    returntype - any
    column - slug
    notnull - true
    ormtype - string
    index - idx_menuslug
    length - 200
    serializable - true

    title

    property any title

    Attributes:
    access - public
    required - false
    returntype - any
    column - title
    notnull - true
    ormtype - string
    index - idx_menutitle
    length - 200
    serializable - true

    Method Detail

    addMenuItem

    public Menu addMenuItem(any menuItem)

    Parameters:
    menuItem

    createMenuItems

    private array createMenuItems(array rawData)

    Recursive function to build menu items hierarchy from raw data

    Parameters:
    rawData - The raw data definitions for the menu items

    getListClass

    public string getListClass()


    getListType

    public string getListType()


    getMenuClass

    public string getMenuClass()


    getMenuID

    public string getMenuID()


    getMenuItemService

    public string getMenuItemService()


    getMenuItems

    public string getMenuItems()


    getMenuService

    public string getMenuService()


    getORMService

    public string getORMService()


    getRootMenuItems

    public array getRootMenuItems()

    Retrieves root menu items (only items with no parents)


    getSite

    public string getSite()


    getSiteId

    public any getSiteId()

    Shortcut to get the site id


    getSiteName

    public any getSiteName()

    Shortcut to get the site name


    getSiteSlug

    public any getSiteSlug()

    Shortcut to get the site slug


    getSiteSnapshot

    public struct getSiteSnapshot()

    Build a site snapshot


    getSlug

    public string getSlug()


    getTitle

    public string getTitle()


    hasMenuItem

    public boolean hasMenuItem([any menuItem])

    Parameters:
    menuItem

    hasSite

    public boolean hasSite([any site])

    Parameters:
    site

    populateMenuItems

    public array populateMenuItems(array rawData)

    Creates menu items from raw data objects and attaches them to this menu.

    Parameters:
    rawData - The raw data from which to create menu items

    removeMenuItem

    public boolean removeMenuItem(any menuItem)

    Parameters:
    menuItem

    setListClass

    public any setListClass(any listClass)

    Parameters:
    listClass

    setListType

    public any setListType(any listType)

    Parameters:
    listType

    setMenuClass

    public any setMenuClass(any menuClass)

    Parameters:
    menuClass

    setMenuID

    public any setMenuID(any menuID)

    Parameters:
    menuID

    setMenuItemService

    public any setMenuItemService(any menuItemService)

    Parameters:
    menuItemService

    setMenuItems

    public Menu setMenuItems(array menuItems)

    Parameters:
    menuItems

    setMenuService

    public any setMenuService(any menuService)

    Parameters:
    menuService

    setORMService

    public any setORMService(any ORMService)

    Parameters:
    ORMService

    setSite

    public any setSite(any site)

    Parameters:
    site

    setSlug

    public any setSlug(any slug)

    Parameters:
    slug

    setTitle

    public any setTitle(any title)

    Parameters:
    title