clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • cfApiController
  • cfBackendAdduserAction
  • cfBackendApikeysAction
  • cfBackendBrowsectntAction
  • cfBackendBrowsefilesAction
  • cfBackendClearcacheAction
  • cfBackendClearipblocksAction
  • cfBackendContentpermsAction
  • cfBackendContenttypesAction
  • cfBackendController
  • cfBackendControllerAction
  • cfBackendDashboardAction
  • cfBackendDocumentsAction
  • cfBackendDraftsAction
  • cfBackendEdituserAction
  • cfBackendElementsAction
  • cfBackendFilemgrAction
  • cfBackendFingerprintAction
  • cfBackendForgotpwdAction
  • cfBackendImagepreviewAction
  • cfBackendListusersAction
  • cfBackendLoginAction
  • cfBackendLogoutAction
  • cfBackendModulesAction
  • cfBackendMyprofileAction
  • cfBackendPrivatefilemgrAction
  • cfBackendResetpwdAction
  • cfBackendRolesAction
  • cfBackendSelectsiteAction
  • cfBackendSet403Action
  • cfBackendSet404Action
  • cfBackendSeterrorAction
  • cfBackendSethomeAction
  • cfBackendSetthemeAction
  • cfBackendSettingsAction
  • cfBackendSitemgrAction
  • cfBackendSocialimgsAction
  • cfConfirm
  • cfContent
  • cfContentController
  • cfContentTree
  • cfCron
  • cfCronController
  • cfCustomFieldList
  • cfCustomFields
  • cfDashboardMgr
  • cfDrafts
  • cfInstallController
  • cfNoticesEvent
  • cfNoticesEventMsg
  • cfPseudoCron
  • cfSearchHelper
  • cfSiteManager
  • cfSocialImagesMgr
  • cfTaskRunner
  • cfTaskSnippets
  • cfTemplateEngine
  • cfUserMgr
  • cfUserProfile
  • cfValidatorPageSlug
  • cfValidatorUserEmail
  • cfValidatorUsername
  • clearFusionCMS
  • contentApiV1
  • contentDrafts
  • errorController

Interfaces

  • cfInstallInterface
  • cfInstallUpdInterface
  • cfModuleSettingsInterface
  • cfUserProfileInterface

Exceptions

  • cfException
  • clearFusionCMSException

Class cfContent

cfContent Class

Class to manage and access content in the database.

flDbNestedSet
Extended by cfContent
Package: clearFusionCMS
Copyright: Copyright (c) 2012 -2016 clearFusionCMS. All rights reserved.
Located at system/app/cfContent.php

Methods summary

public
# __construct( flDb $db, string $site )

Construct the content object.

Construct the content object.

Parameters

$db
The database object to use.
$site
The name of the site to operate on.

Overrides

flDbNestedSet::__construct
public static boolean
# isPreview( )

Get if the system is in preview mode.

Get if the system is in preview mode.

Returns

boolean
true if in preview mode; else false.
public static
# setPreview( )

Put content into preview mode.

Put content into preview mode.

public boolean
# hasChildSlug( integer $id, string $slug )

Test if a node has a child with the given slug.

Test if a node has a child with the given slug.

Parameters

$id
The parent node to test.
$slug
The slug to look for.

Returns

boolean
true if has a child with the given slug; else false.
public array
# getEditPermissions( integer $id )

Get the permissions required to edit the document.

Get the permissions required to edit the document.

Parameters

$id
ID of the document to get the permissions for.

Returns

array
Array of all required permissions.
public integer
# getDefaultPage( )

Get the default page to use.

Get the default page to use.

Returns

integer
The ID of the default page.
public integer
# getErrorPage( integer $code )

Get the ID of the error page.

Get the ID of the error page.

Parameters

$code
The error code.

Returns

integer
The ID of the error page or 0 if none set.
public string
# getTheme( )

Get the theme to use for the site.

Get the theme to use for the site.

Returns

string
The theme to use.
public string
# getChildTheme( )

Get the sub theme to use for the site.

Get the sub theme to use for the site.

Returns

string
The child theme to use.
public string
# getCSSFramework( )

Get the CSS framework used by the site theme.

Get the CSS framework used by the site theme.

Returns

string
The CSS Framework used by the theme.
public integer
# getContainer( string $module )

Get the ID of the document that is the container for a module.

Get the ID of the document that is the container for a module.

Parameters

$module
The module to get the container document of.

Returns

integer
The document ID or false if no container.
public string
# getPageURI( integer $id, boolean $absolute = false, boolean $secure = null )

Get the URI of a content page.

Get the URI of a content page.

Parameters

$id
ID of the content page to get the URI of.
$absolute
true if an absolute path is required; else false.
$secure
true for https, false for http, null for as per request.

Returns

string
The URI of the page, or false if the page is unknown.
public flRouterRoute
# getContainerRoute( integer $id, string $route, array $defaults = array(), array $varReq = array(), string $ext = null )

Get the router object for a container page.

Get the router object for a container page.

Parameters

$id
ID of the content page acting as a container.
$route
The route string to match, exact/:var/*
$defaults
Array of defaults.
$varReq
Array of variables and the regular expressions they must match.
$ext
Optional extension to use for matching rather than pages.

Returns

flRouterRoute
The route object.
protected array
# getPagePath( integer $id, boolean $full = false )

Get the path to a page.

Get the path to a page.

Parameters

$id
ID of the content page containing the virtual pages.
$full
true if the full path should be returned or false to shorten the default page URI.

Returns

array
The path to the page and extension, or false if the page is unknown.
public array
# getViewPermissions( integer $id )

Get the permissions required to view the document.

Get the permissions required to view the document.

Parameters

$id
The ID of the document to get the permissions for.

Returns

array
Array of access permissions.

Throws

flDbException
public array
# getPage( array $segments, string $extension = '' )

Get the page data referenced by a path.

Get the page data referenced by a path.

Parameters

$segments
Path segments to the page or ID of page to get.
$extension
The file extension, used only if $segments is an array.

Returns

array
Array of page data or false if the page is not found.
public array
# getCustomFields( integer $id )

Get the custom fields for the node.

Get the custom fields for the node.

Parameters

$id
The ID of the node to get the custom fields for.

Returns

array
The array of placeholders and their values.

Throws

flDbException
public array
# getMenuItems( integer $id, array $include, array $exclude, string $sortBy, string $sortOrder, integer $limit, boolean $ignoreHide, string $customFields )

Get menus items for the given node.

Get menus items for the given node.

Parameters

$id
The ID of the node to get the items for.
$include
Array of page id's to include or null.
$exclude
Array of page id's to exclude or null.
$sortBy
The field to sort by, lft for menu order.
$sortOrder
The order to sort by, ASC or DESC.
$limit
The number of results to limit to or 0 for unlimited.
$ignoreHide
true if to ignore menu hide status.
$customFields
Comma separated list of custom fields.

Returns

array
The fields fetched from the child nodes.
public boolean
# renderPage( cfTemplateEngine $tpl, array $data, string $cacheIDExt = '' )

Render content page.

Render content page.

Parameters

$tpl
The template engine to use.
$data
Array of page data elements.
$cacheIDExt
Additional information to add to the cache ID.

Returns

boolean
true if the page was output; else false.

Throws

flExceptionNotFound

Methods inherited from flDbNestedSet

deleteNode(), getByPath(), getByShortPath(), getChildAt(), getChildren(), getDepth(), getFirstChild(), getLastChild(), getNextSibling(), getNodeData(), getParent(), getPath(), getPrevSibling(), getShortPath(), getSize(), insertNode(), lock(), moveNode(), unlock(), updateNodeData()

Constants summary

Constants inherited from flDbNestedSet

AFTER, BEFORE, UNDER

Properties summary

protected flConfig $config

The site configuration.

The site configuration.

#
protected array $extCache

Map of content types to file extensions.

Map of content types to file extensions.

# array()
protected string $site

The site name.

The site name.

#
protected array $containerCache

Cache of module container lookups.

Cache of module container lookups.

# array()
protected static boolean $inPreview

Tracks if the system is in preview mode.

Tracks if the system is in preview mode.

# false

Properties inherited from flDbNestedSet

$db, $idField, $lockCount, $table

clearFusionCMS 3.0.0 API documentation generated by ApiGen