Class BlockType

Namespace: Concrete\Core\Block\BlockType
Entity
Table(name="blocktypes")
Located at src/Block/BlockType/BlockType.php

Methods summary

public static Concrete\Core\Block\BlockType\BlockType
# getByHandle( $btHandle )

Retrieves a BlockType object based on its btHandle

public static
# clearCache( )

Clears output and record caches.

public static Concrete\Core\Block\BlockType\BlockType
# getByID( $btID )

Retrieves a BlockType object based on its btID

public static
# installBlockTypeFromPackage( $btHandle, $pkg )
public static
# installBlockType( $btHandle, $pkg = false )

Installs a BlockType that is passed via a btHandle string. The core or override directories are parsed.

public static string
# getBlockTypeMappedClass( $btHandle, $pkgHandle = false )

Return the class file that this BlockType uses

public
# setBlockTypeIgnorePageThemeGridFrameworkContainer( $btIgnorePageThemeGridFrameworkContainer )

Sets the Ignore Page Theme Gride Framework Container

public
# setBlockTypeName( $btName )

Sets the block type handle

public
# setBlockTypeDescription( $btDescription )

Sets the block type description

public
# setBlockTypeHandle( $btHandle )

Sets the block type handle

public boolean
# hasAddTemplate( )

Determines if the block type has templates available

public Concrete\Core\Filesystem\TemplateFile[]
# getBlockTypeComposerTemplates( )

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

public string
# getBlockTypeHandle( )
public boolean
# supportsInlineEdit( )

if a the current BlockType supports inline edit or not

public boolean
# supportsInlineAdd( )

if a the current BlockType supports inline add or not

public boolean
# isInternalBlockType( )

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

public integer
# getBlockTypeInterfaceWidth( )

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

public integer
# getBlockTypeInterfaceHeight( )

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

public boolean
# 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.

public integer
# getPackageID( )

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

public string
# getBlockTypeDescription( )

gets the BlockTypes description text

public string
# getBlockTypeName( )
public boolean
# isCopiedWhenPropagated( )
public boolean
# 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.

public
public
# getBlockTypeClass( )

Returns the class for the current block type.

public string
# getPackageHandle( )

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

public
# getBlockTypeSets( )

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

public integer
# getBlockTypeID( )
public integer
# getCount( boolean $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

public boolean
# canUnInstall( )

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

public boolean
# isBlockTypeInternal( )

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

public
# render( string $view = 'view' )

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

public BlockTypeController
# getController( )

get's the block type controller

public Concrete\Core\Filesystem\TemplateFile[]
# getBlockTypeCustomTemplates( )

Gets the custom templates available for the current BlockType

public
# setBlockTypeDisplayOrder( $displayOrder )
public
# refresh( )

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

protected
public
# delete( )

Removes the block type. Also removes instances of content.

public boolean|Concrete\Core\Block\Block
# add( mixed $data, boolean|Collection $c = false, boolean|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.

protected
# loadController( )

Loads controller

Properties summary

public $controller
#
protected boolean $btIgnorePageThemeGridFrameworkContainer
# false
protected $btID
#
protected $btHandle
#
protected $btName
#
protected $btDescription
#
protected boolean $btCopyWhenPropagate
# false
protected boolean $btIncludeAll
# false
protected boolean $btIsInternal
# false
protected boolean $btSupportsInlineEdit
# false
protected boolean $btSupportsInlineAdd
# false
protected $btInterfaceHeight
#
protected $btInterfaceWidth
#
protected integer $pkgID
# 0