Class BlockController

Interface ApplicationAwareInterface This interface declares awareness of the concrete5 application.

Concrete\Core\Controller\AbstractController implements Concrete\Core\Application\ApplicationAwareInterface
Extended by Concrete\Core\Block\BlockController

Direct known subclasses

Concrete\Block\Autonav\Controller, Concrete\Block\Content\Controller, Concrete\Block\DashboardAppStatus\Controller, Concrete\Block\DashboardFeaturedAddon\Controller, Concrete\Block\DashboardFeaturedTheme\Controller, Concrete\Block\DashboardNewsflowLatest\Controller, Concrete\Block\DashboardSiteActivity\Controller, Concrete\Block\DateNavigation\Controller, Concrete\Block\Discussion\Controller, Concrete\Block\ExternalForm\Controller, Concrete\Block\Faq\Controller, Concrete\Block\Feature\Controller, Concrete\Block\CoreAreaLayout\Controller, Concrete\Block\File\Controller, Concrete\Block\Form\Controller, Concrete\Block\GoogleMap\Controller, Concrete\Block\HorizontalRule\Controller, Concrete\Block\Html\Controller, Concrete\Block\Image\Controller, Concrete\Block\ImageSlider\Controller, Concrete\Block\NextPrevious\Controller, Concrete\Block\PageAttributeDisplay\Controller, Concrete\Block\PageList\Controller, Concrete\Block\CoreConversation\Controller, Concrete\Block\PageTitle\Controller, Concrete\Block\RssDisplayer\Controller, Concrete\Block\Search\Controller, Concrete\Block\ShareThisPage\Controller, Concrete\Block\SocialLinks\Controller, Concrete\Block\Survey\Controller, Concrete\Block\SwitchLanguage\Controller, Concrete\Block\Tags\Controller, Concrete\Block\Testimonial\Controller, Concrete\Block\TopicList\Controller, Concrete\Block\CoreConversationMessage\Controller, Concrete\Block\Video\Controller, Concrete\Block\Youtube\Controller, Concrete\Block\CoreGathering\Controller, Concrete\Block\CoreGatheringDisplay\Controller, Concrete\Block\CorePageTypeComposerControlOutput\Controller, Concrete\Block\CoreScrapbookDisplay\Controller, Concrete\Block\CoreStackDisplay\Controller

Namespace: Concrete\Core\Block
Package: Concrete\Core\Application
Located at src/Block/BlockController.php

Methods summary

public
public
public
public mixed
# install( string $path )

Installs the current block's DB xml file. If a block needs to do more than this, this should be overridden.

public function install($path) {
    $this->doMySpecialInstallMethod();
    $this->doSecondSpecialInstallMethod();
    parent::install($path);
}
public
# render( string $view )

Renders a view in the block's folder.

public function view() { // The view() method is automatically run when a block is viewed
    $this->render("other_special_view"); // don't use .php
}
public
# validate( $args )
public
public
# save( array $args )

Run when a block is added or edited. Automatically saves block data against the block's database table. If a block needs to do more than this (save to multiple tables, upload files, etc... it should override this.

public
public
# getPermissionsObject( )
public
public
# getPermissionObject( )

Gets the permissions object for this controller's block.

public Concrete\Core\Legacy\BlockRecord
# duplicate( integer $newBID )

Automatically run when a block is duplicated. This most likely happens when a block is edited: a block is first duplicated, and then presented to the user to make changes.

public
# __wakeup( )
public
# __construct( Concrete\Core\Block\BlockType\BlockType $obj = null )

Instantiates the block controller.

public
# setBlockObject( $b )

Sets the block object for this controller.

protected
# load( )

Loads the BlockRecord class based on its attribute names.

public
public
# export( SimpleXMLElement $blockNode )
public
public
# import( $page, $arHandle, SimpleXMLElement $blockNode )
protected
# getImportData( $blockNode, $page )
protected
# importAdditionalData( $b, $blockNode )
public
public
public
public
public
public
public
# isValidControllerTask( $method, $parameters = array() )
public
public
public
public
public
public
# field( $fieldName )
public Concrete\Core\Block\Block
# getBlockObject( )

Gets the generic Block object attached to this controller's instance.

public
# post( $field = false, $defaultValue = null )
public
# delete( )

Automatically run when a block is deleted. This removes the special data from the block's specific database table. If a block needs to do more than this this method should be overridden.

public
public
# registerViewAssets( $outputContent = '' )
public
# setupAndRun( $method )
public Area
# getAreaObject( )

Gets the Area object attached to this controller's instance.

public
public
public string
# getBlockTypeName( )

Returns the name of the block type.

public integer
# getInterfaceWidth( )

Returns the width of the block type's interface when presented in page.

public integer
# getInterfaceHeight( )

Returns the height of the block type's interface when presented in page.

public string
# getBlockTypeDescription( )

Returns the description of the block type.

public
# getBlockTypeHelp( )

Returns HTML that will be shown when a user wants help for a given block type.

public
public boolean
# includeAll( )

Returns whether this block type is included in all versions. Default is false - block types are typically versioned but sometimes it makes sense not to do so.

public boolean
# isBlockTypeInternal( )

Returns whether this block type is internal to Concrete. If it's internal it's not displayed in the front end interface. Examples include the LibraryFile block.

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
# 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
# getJavaScriptStrings( )

Returns a key/value array of strings that is used to translate items when used in javascript.

Properties summary

public array $headerItems
# array()
public $blockViewRenderOverride
#
protected $record
#
protected array $helpers
# array('form')
protected $block
#
protected $bID
#
protected string $btDescription
# ""
protected string $btName
# ""
protected string $btHandle
# ""
protected integer $btIsInternal
# 0
protected boolean $btSupportsInlineAdd
# false
protected boolean $btIgnorePageThemeGridFrameworkContainer
# false
protected boolean $btSupportsInlineEdit
# false
protected integer $btCopyWhenPropagate
# 0
protected integer $btIncludeAll
# 0
protected string $btInterfaceWidth
# "400"
protected string $btInterfaceHeight
# "400"
protected boolean $btHasRendered
# false
protected boolean $btCacheBlockRecord
# true
protected boolean $btCacheBlockOutput
# false
protected integer $btCacheBlockOutputLifetime
# 0
protected boolean $btCacheBlockOutputOnPost
# false
protected boolean $btCacheBlockOutputForRegisteredUsers
# false
protected $bActionCID
#
protected array $btExportPageColumns
# array()
protected array $btExportFileColumns
# array()
protected array $btExportPageTypeColumns
# array()
protected array $btExportPageFeedColumns
# array()
protected string $btWrapperClass
# ''
protected $btDefaultSet
#
protected array $btFeatures
# array()
protected $btFeatureObjects
#
protected $identifier
#
protected $btTable
# null