class Collection extends ConcreteObject implements TrackableInterface (View source)

Properties

$error from  ConcreteObject
$cID
protected $vObj
protected $cHandle
protected $cDateAdded
protected $cDateModified
protected $attributes

Methods

loadError($error)

No description

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

static 
camelcase($file)

No description

static 
uncamelcase($string)

No description

static 
reindexPendingPages()

No description

static 
getByHandle($handle)

No description

addCollection($data)

No description

static 
createCollection($data)

No description

static Collection
getByID(int $cID, mixed $version = 'RECENT')

No description

loadVersionObject($cvID = 'ACTIVE')

No description

getVersionToModify()

No description

Version|null
getVersionObject()

Get the attached version object

cloneVersion($versionComments, $createEmpty = false)

No description

getCollectionID()

No description

getNextVersionComments()

No description

getFeatureAssignments()

No description

getVersionID()

No description

reindex($index = false, $actuallyDoReindex = true)

No description

type
getAttribute(string|object $akHandle, bool $displayMode = false)

Returns the value of the attribute with the handle $ak of the current object.

getAttributeValue($akHandle)

No description

getCollectionAttributeValue($akHandle) deprecated

No description

clearCollectionAttributes($retainAKIDs = array())

No description

clearAttribute($ak)

No description

getSetCollectionAttributes()

No description

setAttribute($ak, $value)

No description

Area
getArea(string $arHandle)

No description

hasAliasedContent()

No description

getCollectionHandle()

No description

getCollectionDateAdded()

No description

__destruct()

No description

string
outputCustomStyleHeaderItems(bool $return = false)

Retrieves all custom style rules that should be inserted into the header on a page, whether they are defined in areas or blocks.

getAreaCustomStyle($area, $force = false)

No description

resetAreaCustomStyle($area)

No description

setCustomStyleSet($area, $set)

No description

relateVersionEdits($oc)

No description

getCollectionTypeID()

No description

getPageTypeID()

No description

rescanDisplayOrder($arHandle)

No description

refreshCache()

No description

getGlobalBlocks()

No description

array
getBlocks(bool|string $arHandle = false)

List the blocks in a collection or area within a collection.

array
getBlockIDs(bool|string $arHandle = false)

List the block IDs in a collection or area within a collection.

addBlock($bt, $a, $data)

No description

getCollectionAreaDisplayOrder($arHandle, $ignoreVersions = false)

No description

addFeature(Feature $fe)

No description

markModified()

No description

delete()

No description

duplicateCollection()

No description

getAttributeValueObject($ak)

No description

Details

loadError($error)

No description

Parameters

$error

isError()

No description

getError()

No description

setPropertiesFromArray($arr)

No description

Parameters

$arr

static camelcase($file)

No description

Parameters

$file

static uncamelcase($string)

No description

Parameters

$string

static reindexPendingPages()

No description

static getByHandle($handle)

No description

Parameters

$handle

addCollection($data)

No description

Parameters

$data

static createCollection($data)

No description

Parameters

$data

static Collection getByID(int $cID, mixed $version = 'RECENT')

No description

Parameters

int $cID
mixed $version

'RECENT'|'ACTIVE'|version id

Return Value

Collection

loadVersionObject($cvID = 'ACTIVE')

No description

Parameters

$cvID

getVersionToModify()

No description

Version|null getVersionObject()

Get the attached version object

Return Value

Version|null

cloneVersion($versionComments, $createEmpty = false)

No description

Parameters

$versionComments
$createEmpty

getCollectionID()

No description

getNextVersionComments()

No description

getFeatureAssignments()

No description

getVersionID()

No description

reindex($index = false, $actuallyDoReindex = true)

No description

Parameters

$index
$actuallyDoReindex

type getAttribute(string|object $akHandle, bool $displayMode = false)

Returns the value of the attribute with the handle $ak of the current object.

$displayMode makes it possible to get the correct output value. When you need the raw attribute value or object, use this:

$c = Page::getCurrentPage();
$attributeValue = $c->getAttribute('attribute_handle');

But if you need the formatted output supported by some attribute, use this:

$c = Page::getCurrentPage();
$attributeValue = $c->getAttribute('attribute_handle', 'display');

An attribute type like "date" will then return the date in the correct format just like other attributes will show you a nicely formatted output and not just a simple value or object.

Parameters

string|object $akHandle
bool $displayMode

Return Value

type

getAttributeValue($akHandle)

No description

Parameters

$akHandle

getCollectionAttributeValue($akHandle) deprecated

deprecated

No description

Parameters

$akHandle

clearCollectionAttributes($retainAKIDs = array())

No description

Parameters

$retainAKIDs

clearAttribute($ak)

No description

Parameters

$ak

getSetCollectionAttributes()

No description

setAttribute($ak, $value)

No description

Parameters

$ak
$value

Area getArea(string $arHandle)

No description

Parameters

string $arHandle

Return Value

Area

hasAliasedContent()

No description

getCollectionDateLastModified()

No description

getCollectionHandle()

No description

getCollectionDateAdded()

No description

__destruct()

No description

string outputCustomStyleHeaderItems(bool $return = false)

Retrieves all custom style rules that should be inserted into the header on a page, whether they are defined in areas or blocks.

Parameters

bool $return

Return Value

string

getAreaCustomStyle($area, $force = false)

No description

Parameters

$area
$force

resetAreaCustomStyle($area)

No description

Parameters

$area

setCustomStyleSet($area, $set)

No description

Parameters

$area
$set

relateVersionEdits($oc)

No description

Parameters

$oc

getCollectionTypeID()

No description

getPageTypeID()

No description

rescanDisplayOrder($arHandle)

No description

Parameters

$arHandle

refreshCache()

No description

getGlobalBlocks()

No description

array getBlocks(bool|string $arHandle = false)

List the blocks in a collection or area within a collection.

Parameters

bool|string $arHandle

. If specified, returns just the blocks in an area

Return Value

array

array getBlockIDs(bool|string $arHandle = false)

List the block IDs in a collection or area within a collection.

Parameters

bool|string $arHandle

. If specified, returns just the blocks in an area

Return Value

array

addBlock($bt, $a, $data)

No description

Parameters

$bt
$a
$data

getCollectionAreaDisplayOrder($arHandle, $ignoreVersions = false)

No description

Parameters

$arHandle
$ignoreVersions

addFeature(Feature $fe)

No description

Parameters

Feature $fe

markModified()

No description

delete()

No description

duplicateCollection()

No description

getAttributeValueObject($ak)

No description

Parameters

$ak