class BlockType (View source)

Properties

$controller
protected $btIgnorePageThemeGridFrameworkContainer
protected $btID
protected $btHandle
protected $btName
protected $btDescription
protected $btCopyWhenPropagate
protected $btIncludeAll
protected $btIsInternal
protected $btSupportsInlineEdit
protected $btSupportsInlineAdd
protected $btDisplayOrder
protected $btInterfaceHeight
protected $btInterfaceWidth
protected $pkgID

Methods

getBlockTypeInSetName()

No description

setBlockTypeIgnorePageThemeGridFrameworkContainer($btIgnorePageThemeGridFrameworkContainer)

Sets the Ignore Page Theme Gride Framework Container.

setBlockTypeName($btName)

Sets the block type handle.

setBlockTypeDescription($btDescription)

Sets the block type description.

setBlockTypeHandle($btHandle)

Sets the block type handle.

setPackageID($pkgID)

No description

bool
hasAddTemplate()

Determines if the block type has templates available.

getBlockTypeComposerTemplates()

gets the available composer templates used for editing instances of the BlockType while in the composer ui in the dashboard.

string
getBlockTypeHandle()

No description

bool
supportsInlineEdit()

if a the current BlockType supports inline edit or not.

bool
supportsInlineAdd()

if a the current BlockType supports inline add or not.

bool
isInternalBlockType()

Returns true if the block type is internal (and therefore cannot be removed) a core block.

int
getBlockTypeInterfaceWidth()

returns the width in pixels that the block type's editing dialog will open in.

int
getBlockTypeInterfaceHeight()

returns the height in pixels that the block type's editing dialog will open in.

bool
ignorePageThemeGridFrameworkContainer()

If true, container classes will not be wrapped around this block type in edit mode (if the theme in question supports a grid framework.

int
getPackageID()

returns the id of the BlockType's package if it's in a package.

string
getBlockTypeDescription()

gets the BlockTypes description text.

string
getBlockTypeName()

No description

bool
isCopiedWhenPropagated()

No description

bool
includeAll()

If true, this block is not versioned on a page – it is included as is on all versions of the page, even when updated.

getBlockTypeClassFromHandle() deprecated

No description

getBlockTypeClass()

Returns the class for the current block type.

string
getPackageHandle()

returns the handle of the BlockType's package if it's in a package.

BlockTypeSet[]
getBlockTypeSets()

Returns an array of all BlockTypeSet objects that this block is in.

int
getBlockTypeID()

No description

int
getCount(bool $ignoreUnapprovedVersions = false)

Returns the number of unique instances of this block throughout the entire site note - this count could include blocks in areas that are no longer rendered by the theme.

bool
canUnInstall()

Not a permissions call. Actually checks to see whether this block is not an internal one.

bool
isBlockTypeInternal()

if a the current BlockType is Internal or not - meaning one of the core built-in concrete5 blocks.

render(string $view = 'view')

Renders a particular view of a block type, using the public $controller variable as the block type's controller.

BlockTypeController
getController()

get's the block type controller.

getBlockTypeCustomTemplates(Block $b)

Gets the custom templates available for the current BlockType.

setBlockTypeDisplayOrder($displayOrder)

No description

int
getBlockTypeDisplayOrder()

Get the display order of this block type when it's not assigned to any block type set.

refresh()

refreshes the BlockType's database schema throws an Exception if error.

loadFromController($bta)

No description

delete()

Removes the block type. Also removes instances of content.

bool|Block
add(mixed $data, bool|Collection $c = false, bool|Area $a = false)

Adds a block to the system without adding it to a collection.

loadController()

Loads controller.

Details

getBlockTypeInSetName()

setBlockTypeIgnorePageThemeGridFrameworkContainer($btIgnorePageThemeGridFrameworkContainer)

Sets the Ignore Page Theme Gride Framework Container.

Parameters

$btIgnorePageThemeGridFrameworkContainer

setBlockTypeName($btName)

Sets the block type handle.

Parameters

$btName

setBlockTypeDescription($btDescription)

Sets the block type description.

Parameters

$btDescription

setBlockTypeHandle($btHandle)

Sets the block type handle.

Parameters

$btHandle

setPackageID($pkgID)

Parameters

$pkgID

bool hasAddTemplate()

Determines if the block type has templates available.

Return Value

bool

TemplateFile[] getBlockTypeComposerTemplates()

gets the available composer templates used for editing instances of the BlockType while in the composer ui in the dashboard.

Return Value

TemplateFile[]

string getBlockTypeHandle()

Return Value

string

bool supportsInlineEdit()

if a the current BlockType supports inline edit or not.

Return Value

bool

bool supportsInlineAdd()

if a the current BlockType supports inline add or not.

Return Value

bool

bool isInternalBlockType()

Returns true if the block type is internal (and therefore cannot be removed) a core block.

Return Value

bool

int getBlockTypeInterfaceWidth()

returns the width in pixels that the block type's editing dialog will open in.

Return Value

int

int getBlockTypeInterfaceHeight()

returns the height in pixels that the block type's editing dialog will open in.

Return Value

int

bool ignorePageThemeGridFrameworkContainer()

If true, container classes will not be wrapped around this block type in edit mode (if the theme in question supports a grid framework.

Return Value

bool

int getPackageID()

returns the id of the BlockType's package if it's in a package.

Return Value

int

string getBlockTypeDescription()

gets the BlockTypes description text.

Return Value

string

string getBlockTypeName()

Return Value

string

bool isCopiedWhenPropagated()

Return Value

bool

bool includeAll()

If true, this block is not versioned on a page – it is included as is on all versions of the page, even when updated.

Return Value

bool

getBlockTypeClassFromHandle() deprecated

deprecated

getBlockTypeClass()

Returns the class for the current block type.

string getPackageHandle()

returns the handle of the BlockType's package if it's in a package.

Return Value

string

BlockTypeSet[] getBlockTypeSets()

Returns an array of all BlockTypeSet objects that this block is in.

Return Value

BlockTypeSet[]

int getBlockTypeID()

Return Value

int

int getCount(bool $ignoreUnapprovedVersions = false)

Returns the number of unique instances of this block throughout the entire site note - this count could include blocks in areas that are no longer rendered by the theme.

Parameters

bool $ignoreUnapprovedVersions specify true if you only want to see the number of blocks in active pages

Return Value

int

bool canUnInstall()

Not a permissions call. Actually checks to see whether this block is not an internal one.

Return Value

bool

bool isBlockTypeInternal()

if a the current BlockType is Internal or not - meaning one of the core built-in concrete5 blocks.

Return Value

bool

render(string $view = 'view')

Renders a particular view of a block type, using the public $controller variable as the block type's controller.

Parameters

string $view template 'view' for the default

BlockTypeController getController()

get's the block type controller.

Return Value

BlockTypeController

TemplateFile[] getBlockTypeCustomTemplates(Block $b)

Gets the custom templates available for the current BlockType.

Parameters

Block $b

Return Value

TemplateFile[]

setBlockTypeDisplayOrder($displayOrder)

Parameters

$displayOrder

int getBlockTypeDisplayOrder()

Get the display order of this block type when it's not assigned to any block type set.

Return Value

int

refresh()

refreshes the BlockType's database schema throws an Exception if error.

loadFromController($bta)

Parameters

$bta

delete()

Removes the block type. Also removes instances of content.

bool|Block add(mixed $data, bool|Collection $c = false, bool|Area $a = false)

Adds a block to the system without adding it to a collection.

Passes page and area data along if it is available, however.

Parameters

mixed $data
bool|Collection $c
bool|Area $a

Return Value

bool|Block

loadController()

Loads controller.