This is the API documentation for concrete5 version 5.6 and earlier. View Current API Documentation

Class Concrete5_Model_Collection

A generic object that holds blocks and maps them to areas.

Concrete5_Library_Object
Extended by Object
Extended by Concrete5_Model_Collection

Direct known subclasses

Collection

Package: Pages
Category: Concrete
Copyright: Copyright (c) 2003-2008 Concrete5. (http://www.concrete5.org)
License: MIT License
Author: Andrew Embler andrew@concrete5.org
Located at core/models/collection.php

Methods summary

public
# loadVersionObject( $cvID = 'ACTIVE' )
public
public
public
# cloneVersion( $versionComments )
public type
# getAttribute( string|object $akHandle, boolean $displayMode = false )

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

public
public
# clearCollectionAttributes( $retainAKIDs = array() )
public static
public
public
# reindex( $index = false, $actuallyDoReindex = true )
public
# getAttributeValueObject( $ak, $createIfNotFound = false )
public
# setAttribute( $ak, $value )
public
# clearAttribute( $ak )
public
public
# addAttribute( $ak, $value )
public
# getArea( $arHandle )
public
public
public
# getCollectionDateLastModified( $mask = null, $type = "system" )
public
public
public
# getCollectionDateAdded( $mask = null, $type = 'system' )
public
public
public
# getCollectionAreaDisplayOrder( $arHandle, $ignoreVersions = false )
public
# outputCustomStyleHeaderItems( $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

public
public
public
# setAreaCustomStyle( $area, $csr )
public
# addAreaLayout( $area, $layout, $addToPosition = 'bottom' )
public
public
# updateAreaLayoutId( $cvalID = 0, $newLayoutId = 0 )
public
# deleteAreaLayout( $area, $layout, $deleteBlocks = 0 )
public
public
# rescanDisplayOrder( $areaName )
public static Collection
# getByID( integer $cID, mixed $version = 'RECENT' )
public static
# getByHandle( $handle )
public
public
public array
# getBlockIDs( string $arHandle = false )

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

public array
# getBlocks( string $arHandle = false )

List the blocks in a collection or area within a collection

public Block
# addBlock( BlockType/string $bt, string $a, array $data )

Adds a new block the collection. Specify the block type with $bt by either the BlockType object or a string with the handle of the type.

public
# add( $data )
public
public
# delete( )
public

Properties summary

public $cID
#
protected array $attributes
# array()

Properties inherited from Concrete5_Library_Object

$error