lucee.Componentcborm.models.BaseORMService
cborm.models.VirtualEntityService
contentbox.models.content.CategoryService
ContentBox - A Modular Content Platform Copyright since 2012 by Ortus Solutions, Corp www.ortussolutions.com/products/contentbox --- Category service for contentbox
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
contentService
|
true
|
false
|
|
any
|
dateUtil
|
true
|
false
|
|
any
|
htmlHelper
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
array
|
createCategories(any categories, any site, [boolean isPublic='true'])
Create categories via a comma delimited list and return the entities created. |
boolean
|
delete(any category)
Delete a category which also removes itself from all many-to-many relationships. |
array
|
getAllForExport(any site)
Get all data prepared for export. |
array
|
getAllNames([string siteID=''], [boolean isPublic])
Get an array of names of all categories in the system or by site. |
array
|
getAllSlugs([string siteID=''], [boolean isPublic])
Get an array of slugs of all categories in the system. |
Category
|
getOrCreate(any category, any site)
This function allows you to receive a category object from a site and. |
Category
|
getOrCreateBySlug(string category, any site)
This function allows you to receive a category slug string from a site and. |
numeric
|
getTotalCategoryCount([string siteID=''])
Get the total category counts for the entire installation or by site. |
string
|
importFromData(any importData, [boolean override='false'], [any importLog])
Import data from an array of structures or a single structure of data. |
string
|
importFromFile(any importFile, [boolean override='false'])
Import data from a ContentBox JSON file. |
array
|
inflateCategories([struct memento])
Inflate categories from a collection via 'category_X' pattern and returns an array of category objects. |
boolean
|
isSlugUnique(any slug, [any categoryID=''], [string siteID=''])
Verify an incoming slug is unique or not. |
array
|
removeAllRelatedContent(any category)
|
any
|
save(any category)
Save a category in the system. |
struct
|
search([any search=''], [any siteID=''], [boolean isPublic], [any max='0'], [any offset='0'], [any sortOrder='category asc'])
Category search with filters. |
Methods inherited from class cborm.models.VirtualEntityService |
---|
autoCast, convertIdValueToJavaType, convertValueToJavaType, count, countWhere, deleteAll, deleteByID, deleteByQuery, deleteWhere, evictCollection, executeQuery, exists, findAllWhere, findWhere, get, getAll, getEntityName, getKey, getOrFail, getPropertyNames, getTableName, idCast, list, new, newCriteria, onMissingMethod, setEntityName |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
access
- publicrequired
- falsereturntype
- anyinject
- contentService@contentboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- DateUtil@contentboxserializable
- trueaccess
- publicrequired
- falsereturntype
- anyinject
- HTMLHelper@coldboxserializable
- trueMethod Detail |
---|
Create categories via a comma delimited list and return the entities created
categories
- A list or array of categories to createsite
- The site to attach them to, this must be a site objectisPublic
- Create public or private categoriesDelete a category which also removes itself from all many-to-many relationships
delete
in class
cborm.models.BaseORMService
category
- The category object to remove from the systemGet all data prepared for export
site
- The site to export fromGet an array of names of all categories in the system or by site
siteID
- The site to filter the names fromisPublic
- If passed, show by this filter, else all categoriesGet an array of slugs of all categories in the system
siteID
- The site to filter the names fromisPublic
- If passed, show by this filter, else all categoriesThis function allows you to receive a category object from a site and tries to see if it exists in a new site via slug comparison. If it exists, it returns it, else it creates it and returns it.
category
- The target category object to checksite
- The target site this category should be created inThis function allows you to receive a category slug string from a site and tries to see if it exists in a new site via slug comparison. If it exists, it returns it, else it creates it and returns it.
category
- The target category slug to checksite
- The target site this category should be created inGet the total category counts for the entire installation or by site
siteID
- The site to filter onImport data from an array of structures or a single structure of data
importData
- A struct or array of data to importoverride
- Override content if found in the database, defaults to falseimportLog
- The import log bufferImport data from a ContentBox JSON file. Returns the import log
importFile
- The json file to importoverride
- Override content if found in the database, defaults to falseInflate categories from a collection via 'category_X' pattern and returns an array of category objects as its representation. This is done by the content editors to display the categories for selection.
memento
Verify an incoming slug is unique or not
slug
- The slug to search for uniquenesscategoryID
- Limit the search to the passed categoryId usually for updatessiteID
- The site to filter oncategory
Save a category in the system
save
in class
cborm.models.BaseORMService
category
- The category objectCategory search with filters
search
- The search term for the namesiteID
- The site id to filter onisPublic
- Filter on this public (true) / private (false) or all (null)max
- The max recordsoffset
- The offset to usesortOrder
- The sort order