railo-context.Componentcoldbox.system.orm.hibernate.BaseORMService
coldbox.system.orm.hibernate.VirtualEntityService
contentbox.model.content.ContentService
contentbox.model.content.PageService
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. Page service for contentbox
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
contentService
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
findPublishedPages([numeric max='0'], [numeric offset='0'], [string searchTerm=''], [string category=''], [boolean asQuery='false'], [string parent], [boolean showInMenu], [string sortOrder='publishedDate DESC'])
Find published pages in ContentBox that have no passwords. |
array
|
getAllFlatPages()
Returns an array of [contentID, title, slug] structures of all the pages in the system. |
array
|
getAllForExport()
Get all content for export as flat data. |
any
|
savePage(any page, [string originalSlug=''])
Save a page and do necessary updates. |
struct
|
search([any search=''], [any isPublished], [any author], [any parent], [any category], [any max='0'], [any offset='0'], [any sortOrder='title asc'], [boolean searchActiveContent='true'])
page search returns struct with keys [pages,count]. |
Methods inherited from class coldbox.system.orm.hibernate.VirtualEntityService |
---|
clear, convertIDValueToJavaType, convertValueToJavaType, count, countWhere, criteriaCount, criteriaQuery, deleteAll, deleteByID, deleteByQuery, deleteWhere, evict, executeQuery, exists, findAllWhere, findWhere, get, getAll, getDatasource, getEntityName, getKey, getPropertyNames, getSessionStatistics, getTableName, isSessionDirty, list, new, newCriteria, onMissingMethod, setDatasource, setEntityName |
Methods inherited from class coldbox.system.orm.hibernate.BaseORMService |
---|
$delete, $deleteAll, $deleteByID, $deleteByQuery, $deleteWhere, $save, $saveAll, $transactioned, compileHQLFromDynamicMethod, createCriteriaQuery, createService, delete, evictEntity, evictQueries, findAll, findByExample, findDynamically, findIt, getDefaultAsQuery, getEntityGivenName, getEventHandling, getHQLDynamicCache, getORM, getORMEventHandler, getQueryCacheRegion, getRestrictions, getUseQueryCaching, getUseTransactions, merge, populate, populateFromJSON, populateFromQuery, populateFromXML, populateWithPrefix, refresh, save, saveAll, sessionContains, setDefaultAsQuery, setEventHandling, setHQLDynamicCache, setORM, setORMEventHandler, setQueryCacheRegion, setUseQueryCaching, setUseTransactions |
Methods inherited from class railo-context.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
required
- falseinject
- id:ContentService@cbserializable
- trueMethod Detail |
---|
Find published pages in ContentBox that have no passwords
max
- The max number of pages to return, defaults to 0=alloffset
- The pagination offsetsearchTerm
- Pass a search term to narrow down resultscategory
- Pass a list of categories to narrow down resultsasQuery
- Return results as array of objects or query, default is array of objectsparent
- The parent ID to restrict the search onshowInMenu
- If passed, it limits the search to this content propertysortOrder
- The sort order string, defaults to publisedDate DESCReturns an array of [contentID, title, slug] structures of all the pages in the system
Get all content for export as flat data
getAllForExport
in class
ContentService
Save a page and do necessary updates
page
- The page to save or updateoriginalSlug
- If an original slug is passed, then we need to update hierarchy slugs.page search returns struct with keys [pages,count]
search
isPublished
author
parent
- If empty, then looks for empty parent nodes. If you do not want to attach it, send as nullcategory
max
offset
sortOrder
searchActiveContent