Table of Contents

Namespace Contensive.BaseClasses

Classes

AddonBaseClass
CPAddonBaseClass

CP.Addon - The Addon class represents the instance of an add-on. To use this class, use its constructor and open an cpcore.addon. Use these properties to retrieve it's configuration

CPAdminUIBaseClass

Methods to create a uniform admin UI interface

CPBaseClass

CP - The object passed to an addon in the add-ons execute method. See the AddonBaseClass for details of the addon execute method.

CPBlockBaseClass

CP.Block - an object that holds and manipulates a block of html

CPCSBaseClass

CP.CS - The secondary interface to execute queries on a sql database. Use dbModels when possible (does not use cdef metadata). To run queries, use executeQuery, executeNonQuery and executeNonQueryAsync.

CPCacheBaseClass

CP.Cache - local and remote caching

CPContentBaseClass
CPDateBaseClass

provate consistent JSON methods in a single updateable layer

CPDbBaseClass

CP.Db - This object references the database directly

CPDocBaseClass

The document being constructed

CPDocBaseClass.HtmlAssetClass

assets to be added to the head section (and end-of-body) of html documents

CPEmailBaseClass

Methods to send and manage email.

CPFileBaseClass

This class has been deprecated. use cp.CdnFiles, cp.PrivateFiles, cp.WwwFiles, or cp.TempFiles instead.

CPFileSystemBaseClass
CPFileSystemBaseClass.FileDetail

argument details for file and folder methods

CPFileSystemBaseClass.FolderDetail

argument details for file and folder methods

CPGroupBaseClass

Methods and Properties for Groups

CPHtml5BaseClass
CPHtmlBaseClass
CPHttpBaseClass

Helper methods to perform common http requests

CPImageBaseClass

Image resizing, cropping, and padding methods.

ResizeAndCrop: Resize the image so its smallest dimension fills the target hole, then crop the overflow on the larger dimension (centered). The result completely fills the hole with no letterboxing.

ResizeAndPad: Resize the image so its largest dimension fits the target hole, then pad the remaining space with transparency. The entire image is visible.

holeWidth / holeHeight behavior:

  • Both > 0: Resize and crop (or pad) to the exact target dimensions.
  • One is 0: Resize proportionally using the non-zero dimension. No crop or pad is performed. Use this for "As-Is" aspect ratio where the image keeps its natural proportions.
  • Both are 0: No resize; the original image path is returned.

Images are never scaled up. If the target is larger than the source, the source is cropped (or padded) to the target proportions at its original resolution.

Methods ending in "NoTypeChange" preserve the source image format. Methods without that suffix convert to WebP format.

CPImageBaseClass.ImageResizeResult

Result of an image resize operation, including actual output dimensions.

CPImageBaseClass.ImgSrcSetResult

Result of responsive srcset generation, containing the attribute values needed for a responsive img tag.

CPJSONBaseClass

provate consistent JSON methods in a single updateable layer

CPLayoutBaseClass

Manage layout records

CPLogBaseClass

CP.Log, methods to access and control the logging system

CPMQTTBaseClass

MQTT interface for publishing messages to IoT devices and subscribing to receive messages from them. Configuration is set through site properties: mqtt endpoint, mqtt broker port, mqtt certificate filename, mqtt certificate password, mqtt root certificate filename.

CPMessageQueueBaseClass

Message queue

CPMustacheBaseClass

Manage mustache compatible templating

CPRequestBaseClass

Properties of optional http request

CPResponseBaseClass

Control over the optional http response

CPSMSBaseClass

text messaging (SNS) layer. Provide properties and methods to abstract the service for addons.

CPSecretsBaseClass
CPSecurityBaseClass
CPSiteBaseClass

Application settings and methods

CPUserBaseClass

properties and methods that relate to the current user identity.

CPUserErrorBaseClass

Can be used to accumulate user errors during a disperate process.

CPUtilsBaseClass

helper methods to support processes, properties and methods used throughout

CPUtilsBaseClass.addonExecuteContext

When an addon is execute, this object describes the environment in which the addon will be used.

CPUtilsBaseClass.addonExecuteHostRecordContext

When an addon is executed from content with {% JSON %}, this object describes the record in which the command was executed

CPVisitBaseClass
CPVisitorBaseClass
QueueMessageDetail

Enums

CPContentBaseClass.FieldTypeIdEnum

Field types. This enum replaces FileTypeIdEnug.

CPContentBaseClass.GoogleVisualizationStatusEnum
CPContentBaseClass.fileTypeIdEnum

Obsolete. Use FieldTypeIdEnum

CPDocBaseClass.HtmlAssetTypeEnum

Types of assets for htmlAsset.assetType property, like script or style

CPHtml5BaseClass.EditorContentType

The type of content being edited with the html editor. Used to determine types of addons that can be included

CPHtml5BaseClass.EditorUserRole

The role of the user

CPHtmlBaseClass.EditorContentScope

The type of content being edited with the html editor. Used to determine types of addons that can be included

CPHtmlBaseClass.EditorUserScope

The role of the user

CPLayoutBaseClass.ImporttypeEnum
CPLogBaseClass.LogLevel

Log levels

CPUtilsBaseClass.addonContext

When an addon is executed, this is a description of the context of the method. Used to support features like html-comments only appropriate for some context