The following methods are available for the CollectionType object.
$pageType = CollectionType::getByHandle($handle)
$pageType = CollectionType::getByID($id)
Returns the CollectionType object.
$page = $pageType->getMasterTemplate()
Returns the master page for a particular page type.
$pageType->delete()
Deletes a page type and its associated master collection.
$pageType = CollectionType::add($data, $pkg = null)
Adds a page type. $data may contain ctHandle, ctName, ctIcon.
$pageType = CollectionType::update($data)
Updates the page type with the same $data array.
$pages = $pageType->getPages()
Returns an array of pages of this type. Does not check permissions since this can get pretty long it actually returns a limited amount of data.
$pageType->assignCollectionAttribute(CollectionAttributeKey $ak)
Assigns an attribute key to a page type. This will make the attribute key show up when adding pages of this type.
$pageType->getCollectionTypeIconImage()
Returns an IMG tag for the page type's icon.
$pageType->getCollectionTypeID()
Returns the ID.
$pageType->getCollectionTypeName()
Returns the name.
$pageType->getCollectionTypeHandle()
Returns the page type handle.
$pageType->getMasterCollectionID()
Returns the master collection ID.
$pageType->getCollectionTypeIcon()
Returns the pointer to the icon.
$pageType->getPackageID()
Returns the package ID, if one exists.
$pageType->getPackageHandle()
Returns the package handle, if one exists.