Set
class Set extends ConcreteObject (View source)
Properties
$error | from ConcreteObject |
Methods
Get a block type set given its handle.
Get the list of block types that don't belong to any block type set.
Get the block type set ID.
Get the block type set handle.
Get the block type set name.
Get the block type set name (localized and escaped accordingly to $format).
Get the ID of the package that defined this set.
Get the handle of the package that defined this set.
Update the name of this set.
Update the handle of this set.
Update the display order of this set.
Update the display order of a block type contained in this set.
Disassociate all the block types currently associated to this set.
Get the list of block types associated to this set.
Delete this set.
Regenereate the display order values of the block types associated to this set.
Details
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 Set|null
getByID(int $btsID)
Get a block type set given its ID.
static Set|null
getByHandle(string $btsHandle)
Get a block type set given its handle.
static Set[]
getListByPackage(Package|Package|int $pkg)
Get the list of block type sets defined by a package.
static Set[]
getList(string[] $excluded = ['core_desktop'])
Get the list of block type sets.
static Set
add(string $btsHandle, string $btsName, Package|Package|int|false $pkg = false)
Create a new block type set.
static
exportList(SimpleXMLElement $xml)
Export all the block type sets to a SimpleXMLElement element.
static BlockType[]
getUnassignedBlockTypes(bool $includeInternalBlockTypes = false)
Get the list of block types that don't belong to any block type set.
int
getBlockTypeSetID()
Get the block type set ID.
string
getBlockTypeSetHandle()
Get the block type set handle.
string
getBlockTypeSetName()
Get the block type set name.
string
getBlockTypeSetDisplayName(string $format = 'html')
Get the block type set name (localized and escaped accordingly to $format).
int|null
getPackageID()
Get the ID of the package that defined this set.
string|false
getPackageHandle()
Get the handle of the package that defined this set.
updateBlockTypeSetName(string $btsName)
Update the name of this set.
updateBlockTypeSetHandle(string $btsHandle)
Update the handle of this set.
updateBlockTypeSetDisplayOrder(int $displayOrder)
Update the display order of this set.
addBlockType(BlockType $bt)
Associate a block type to this set.
setBlockTypeDisplayOrder(BlockType $bt, int $displayOrder)
Update the display order of a block type contained in this set.
clearBlockTypes()
Disassociate all the block types currently associated to this set.
deleteKey(BlockType|int $bt)
Dissociate a specific block type currently associated to this set.
SimpleXMLElement
export(SimpleXMLElement $axml)
Export this set to a SimpleXMLElement element.
BlockType[]
getBlockTypes()
Get the list of block types associated to this set.
bool
contains(BlockType|int $bt)
Does this set contain a block type?
int|false
displayOrder(BlockType|int $bt)
Get the display order of a block type as sorted for this set.
delete()
Delete this set.
BlockType[]
get()
deprecated
deprecated
No description
protected
rescanDisplayOrder()
Regenereate the display order values of the block types associated to this set.