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
    date createdDate


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


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


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


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


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


    • access = public
    • fieldtype = id
    • returntype = any
    • params = { allocationSize = 1, sequence = 'menuID_seq' }
    • generator = native
    • setter = no
    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 menuItemService


    • access = public
    • returntype = any
    • inject = menuItemService@cb
    • persistent = false
    true false
    any menuService


    • access = public
    • returntype = any
    • inject = menuService@cb
    • persistent = false
    true false
    date modifiedDate


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


    • access = public
    • returntype = any
    • inject = entityservice
    • persistent = false
    true false
    any slug


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


    • access = public
    • returntype = any
    • 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)
         Recusive function to build menu items hierarchy from raw data.
    string getListClass()
    string getListType()
    struct getMemento([any excludes=''])
         Get a flat representation of this menu.
    string getMenuClass()
    string getMenuID()
    string getMenuItems()
    string getMenuItemService()
    string getMenuService()
    string getORMService()
    array getRootMenuItems()
         Retrieves root menu items (only items with no parents).
    string getSlug()
    string getTitle()
    boolean hasMenuItem([any menuItem])
    Menu populateMenuItems(array rawData)
         Creates menu items from raw data object.
    boolean removeMenuItem(any menuItem)
    any setListClass(any listClass)
    any setListType(any listType)
    any setMenuClass(any menuClass)
    Menu setMenuItems(array menuItems)
    any setMenuItemService(any menuItemService)
    any setMenuService(any menuService)
    any setORMService(any ORMService)
    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
    getBaseMemento, getDisplayCreatedDate, getDisplayModifiedDate, isLoaded, preInsert, preUpdate
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    constructor


    Property Detail

    createdDate

    property date createdDate

    Attributes:
    access - public
    required - false
    returntype - any
    notnull - true
    ormtype - timestamp
    update - false
    index - idx_createDate
    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

    listClass

    property any listClass

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

    listType

    property any listType = [ul]

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

    menuClass

    property any menuClass

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

    menuID

    property any menuID

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

    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

    menuItemService

    property any menuItemService

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

    menuService

    property any menuService

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

    modifiedDate

    property date modifiedDate

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

    ORMService

    property any ORMService

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

    slug

    property any slug

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

    title

    property any title

    Attributes:
    access - public
    required - false
    returntype - any
    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)

    Recusive 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()


    getMemento

    public struct getMemento([any excludes=''])

    Get a flat representation of this menu slugCache.hint Cache of slugs to prevent infinite recursions

    Parameters:
    excludes

    getMenuClass

    public string getMenuClass()


    getMenuID

    public string getMenuID()


    getMenuItems

    public string getMenuItems()


    getMenuItemService

    public string getMenuItemService()


    getMenuService

    public string getMenuService()


    getORMService

    public string getORMService()


    getRootMenuItems

    public array getRootMenuItems()

    Retrieves root menu items (only items with no parents)


    getSlug

    public string getSlug()


    getTitle

    public string getTitle()


    hasMenuItem

    public boolean hasMenuItem([any menuItem])

    Parameters:
    menuItem

    populateMenuItems

    public Menu populateMenuItems(array rawData)

    Creates menu items from raw data object

    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

    setMenuItems

    public Menu setMenuItems(array menuItems)

    Parameters:
    menuItems

    setMenuItemService

    public any setMenuItemService(any menuItemService)

    Parameters:
    menuItemService

    setMenuService

    public any setMenuService(any menuService)

    Parameters:
    menuService

    setORMService

    public any setORMService(any ORMService)

    Parameters:
    ORMService

    setSlug

    public any setSlug(any slug)

    Parameters:
    slug

    setTitle

    public any setTitle(any title)

    Parameters:
    title