ContentBox Core API 1.6.0

contentbox.model.content
Class Category

WEB-INF.cftags.component
        extended by contentbox.model.content.Category

public class Category
extends WEB-INF.cftags.component

******************************************************************************* ContentBox - A Modular Content Platform Copyright 2012 by Luis Majano and Ortus Solutions, Corp www.gocontentbox.org | www.luismajano.com | www.ortussolutions.com ******************************************************************************* Apache License, Version 2.0 Copyright Since [2012] [Luis Majano and Ortus Solutions,Corp] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ******************************************************************************* I content category

Property Summary
Type Property & Description Default Serializable Required
 any category


Attributes:
  • notnull = true
  • length = 200
true false
 any categoryID


Attributes:
  • generator = native
  • fieldtype = id
  • setter = false
true false
 array content


Attributes:
  • lazy = extra
  • linktable = cb_contentCategories
  • fieldtype = many-to-many
  • inversejoincolumn = FK_contentID
  • cascade = all
  • cfc = contentbox.model.content.BaseContent
  • fkcolumn = FK_categoryID
true false
 any numberOfEntries


Attributes:
  • formula = select count(*) from cb_contentCategories as contentCategories, cb_entry as entry, cb_content as content where contentCategories.FK_categoryID=categoryID and contentCategories.FK_contentID = entry.contentID and entry.contentID = content.contentID and content.isPublished = 1
true false
 any numberOfPages


Attributes:
  • formula = select count(*) from cb_contentCategories as contentCategories, cb_page as page, cb_content as content where contentCategories.FK_categoryID=categoryID and contentCategories.FK_contentID = page.contentID and page.contentID = content.contentID and content.isPublished = 1
true false
 any slug


Attributes:
  • index = idx_slug
  • unique = true
  • notnull = true
  • length = 200
true false
 
Method Summary
 void ADDCONTENT(BaseContent content)
 any GETCATEGORY()
          get:
 any GETCATEGORYID()
          get:
 array GETCONTENT()
          get:
 any GETNUMBEROFENTRIES()
          get:
 any GETNUMBEROFPAGES()
          get:
 any GETSLUG()
          get:
 boolean HASCONTENT([BaseContent content])
 boolean REMOVECONTENT(BaseContent content)
 Category SETCATEGORY(any category)
          set:
 Category SETCONTENT(array content)
          set:
 Category SETNUMBEROFENTRIES(any numberOfEntries)
          set:
 Category SETNUMBEROFPAGES(any numberOfPages)
          set:
 Category SETSLUG(any slug)
          set:
 any getMemento()
          Get memento representation
 boolean isLoaded()
          is loaded?
 Category removeAllContent()
 
Methods inherited from class WEB-INF.cftags.component
None
 

Property Detail

category

any category

Attributes:
serializable - true
required - false
notnull - true
length - 200
default -

categoryID

any categoryID

Attributes:
generator - native
fieldtype - id
serializable - true
required - false
default -
setter - false

content

array content

Attributes:
serializable - true
lazy - extra
default -
linktable - cb_contentCategories
fieldtype - many-to-many
required - false
inversejoincolumn - FK_contentID
cascade - all
cfc - contentbox.model.content.BaseContent
fkcolumn - FK_categoryID

numberOfEntries

any numberOfEntries

Attributes:
formula - select count(*) from cb_contentCategories as contentCategories, cb_entry as entry, cb_content as content where contentCategories.FK_categoryID=categoryID and contentCategories.FK_contentID = entry.contentID and entry.contentID = content.contentID and content.isPublished = 1
required - false
serializable - true
default -

numberOfPages

any numberOfPages

Attributes:
formula - select count(*) from cb_contentCategories as contentCategories, cb_page as page, cb_content as content where contentCategories.FK_categoryID=categoryID and contentCategories.FK_contentID = page.contentID and page.contentID = content.contentID and content.isPublished = 1
required - false
serializable - true
default -

slug

any slug

Attributes:
index - idx_slug
unique - true
serializable - true
required - false
notnull - true
length - 200
default -

Method Detail

ADDCONTENT

public void ADDCONTENT(BaseContent content)

Parameters:
content

GETCATEGORY

public any GETCATEGORY()
get:


GETCATEGORYID

public any GETCATEGORYID()
get:


GETCONTENT

public array GETCONTENT()
get:


GETNUMBEROFENTRIES

public any GETNUMBEROFENTRIES()
get:


GETNUMBEROFPAGES

public any GETNUMBEROFPAGES()
get:


GETSLUG

public any GETSLUG()
get:


HASCONTENT

public boolean HASCONTENT([BaseContent content])

Parameters:
content

REMOVECONTENT

public boolean REMOVECONTENT(BaseContent content)

Parameters:
content

SETCATEGORY

public Category SETCATEGORY(any category)
set:

Parameters:
category

SETCONTENT

public Category SETCONTENT(array content)
set:

Parameters:
content

SETNUMBEROFENTRIES

public Category SETNUMBEROFENTRIES(any numberOfEntries)
set:

Parameters:
numberOfEntries

SETNUMBEROFPAGES

public Category SETNUMBEROFPAGES(any numberOfPages)
set:

Parameters:
numberOfPages

SETSLUG

public Category SETSLUG(any slug)
set:

Parameters:
slug

getMemento

public any getMemento()
Get memento representation


isLoaded

public boolean isLoaded()
is loaded?


removeAllContent

public Category removeAllContent()


ContentBox Core API 1.6.0