class Controller extends BlockController implements NotificationProviderInterface (View source)

Traits

Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface

Constants

FORM_RESULTS_CATEGORY_NAME

Properties

protected Application $app from  ApplicationAwareTrait
protected $helpers from  BlockController
protected $sets from  AbstractController
protected $action from  AbstractController
protected $request from  AbstractController
protected $parameters from  AbstractController
$headerItems from  BlockController
$blockViewRenderOverride from  BlockController
protected $record from  BlockController
protected $block from  BlockController
protected $bID from  BlockController
protected $btDescription from  BlockController
protected $btName from  BlockController
protected $btHandle from  BlockController
protected $btIsInternal from  BlockController
protected $btSupportsInlineAdd from  BlockController
protected $btIgnorePageThemeGridFrameworkContainer from  BlockController
protected $btSupportsInlineEdit from  BlockController
protected $btCopyWhenPropagate from  BlockController
protected $btIncludeAll from  BlockController
protected $btInterfaceWidth
protected $btInterfaceHeight
protected $btHasRendered from  BlockController
protected $btCacheBlockRecord from  BlockController
protected $btCacheBlockOutput
protected $btCacheBlockOutputLifetime from  BlockController
protected $btCacheBlockOutputOnPost from  BlockController
protected $btCacheBlockOutputForRegisteredUsers from  BlockController
protected $bActionCID from  BlockController
protected $btExportPageColumns from  BlockController
protected $btExportFileColumns from  BlockController
protected $btExportPageTypeColumns from  BlockController
protected $btExportPageFeedColumns from  BlockController
protected $btWrapperClass from  BlockController
protected $btDefaultSet from  BlockController
protected $btFeatures from  BlockController
protected $btFeatureObjects from  BlockController
protected $identifier from  BlockController
protected $btTable
protected bool $supportSavingNullValues

Set this to true if the data sent to the save/performSave methods can contain NULL values that should be persisted.

from  BlockController
protected $entityManager
$notifyMeOnSubmission
$recipientEmail
$replyToEmailControlID

Methods

setApplication(Application $app)

Setter method for the application

__construct(BlockType $obj = null)

No description

mixed
getRequest()

No description

setRequest(mixed $request)

No description

requireAsset()

No description

addHeaderItem(string $item)

Adds an item to the view's header. This item will then be automatically printed out before the section of the page.

addFooterItem(string $item)

Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.

set($key, $val)

No description

getSets()

No description

getHelperObjects()

No description

get($key = null, $defaultValue = null)

No description

getTask()

No description

getAction()

No description

getParameters()

No description

on_start()

No description

on_before_render()

No description

isPost() deprecated

No description

post($field = false, $defaultValue = null)

No description

redirect()

No description

runTask($action, $parameters)

No description

runAction($action, $parameters = array())

No description

request($key = null)

No description

getBlockTypeInSetName()

No description

getIdentifier()

No description

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.

render(string $view)

Renders a view in the block's folder.

validate($args)

No description

getBlockControllerData()

No description

performSave(array $args, bool $loadExisting = false)

Persist the block options.

save($data)

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.

cacheBlockRecord()

No description

getPermissionsObject() deprecated

No description

getBlockTypeDefaultSet()

No description

getPermissionObject()

Gets the permissions object for this controller's block.

duplicate($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.

__wakeup()

No description

setBlockObject($b)

Sets the block object for this controller.

load()

Loads the BlockRecord class based on its attribute names.

export(SimpleXMLElement $blockNode)

No description

import($page, $arHandle, SimpleXMLElement $blockNode)

No description

getImportData($blockNode, $page)

No description

importAdditionalData($b, $blockNode)

No description

setPassThruBlockController(PageController $controller)

No description

getPassThruActionAndParameters($parameters)

No description

isValidControllerTask($method, $parameters = [])

No description

cacheBlockOutput()

No description

cacheBlockOutputOnPost()

No description

getCollectionObject()

No description

field($fieldName)

No description

getBlockObject()

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

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.

outputAutoHeaderItems()

No description

registerViewAssets($outputContent = '')

No description

setupAndRun($method)

No description

Area
getAreaObject()

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

setAreaObject($a)

No description

uninstall()

No description

string
getBlockTypeName()

Returns the name of the block type.

int
getInterfaceWidth()

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

int
getInterfaceHeight()

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

string
getBlockTypeDescription()

Used for localization. If we want to localize the name/description we have to include this.

getBlockTypeHelp()

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

isCopiedWhenPropagated()

No description

bool
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.

bool
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.

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
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.

getJavaScriptStrings()

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

clearSessionControls()

No description

add()

No description

getNotifications()

No description

action_form_success($bID = null)

No description

action_submit($bID = null)

No description

loadResultsFolderInformation()

No description

action_add_control()

No description

saveAttributeKeySettings($controller, ExpressKey $key, $post)

No description

action_update_control()

No description

edit()

No description

action_get_type_form()

No description

getAssetsDefinedDuringOutput()

No description

action_get_control()

No description

getFormEntity()

No description

view()

No description

Details

setApplication(Application $app)

Setter method for the application

Parameters

Application $app

__construct(BlockType $obj = null)

No description

Parameters

BlockType $obj

|Block $obj

mixed getRequest()

No description

Return Value

mixed

setRequest(mixed $request)

No description

Parameters

mixed $request

requireAsset()

No description

addHeaderItem(string $item)

Adds an item to the view's header. This item will then be automatically printed out before the section of the page.

Parameters

string $item

addFooterItem(string $item)

Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.

Parameters

string $item

set($key, $val)

No description

Parameters

$key
$val

getSets()

No description

shouldRunControllerTask()

No description

getHelperObjects()

No description

get($key = null, $defaultValue = null)

No description

Parameters

$key
$defaultValue

getTask()

No description

getAction()

No description

getParameters()

No description

on_start()

No description

on_before_render()

No description

isPost() deprecated

deprecated

No description

post($field = false, $defaultValue = null)

No description

Parameters

$field
$defaultValue

redirect()

No description

runTask($action, $parameters)

No description

Parameters

$action
$parameters

runAction($action, $parameters = array())

No description

Parameters

$action
$parameters

request($key = null)

No description

Parameters

$key

getBlockTypeInSetName()

No description

getBlockTypeExportPageColumns()

No description

getIdentifier()

No description

getBlockTypeWrapperClass()

No description

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);
}
```.

There are several different possible return values:
 Returns FALSE if $btTable is set but no db.xml file exists.
 Otherwise returns object with two properties: ->result (a boolean), and ->message (a string).
 If ->result is true, the installation was successful
 (although the db.xml file might only have one field declared which will cause C5 to have problems later on, so you you will want to check for that separately).
 If ->result is false, the installation failed and you can check ->message for the explanation
 (usually -- sometimes ->message will be blank, in which case there's either a malformed db.xml file or an "unknown database error").
See concrete/models/block_types.php::doInstallBlockType() for usage example.

Parameters

string $path

Return Value

mixed

boolean or object having ->result (boolean) and ->message (string) properties

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
}
```.

Parameters

string $view

validate($args)

No description

Parameters

$args

getBlockControllerData()

No description

protected performSave(array $args, bool $loadExisting = false)

Persist the block options.

Parameters

array $args

An array that contains the block options

bool $loadExisting

Shall we initialize the record to be saved with the current data?

save($data)

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.

Parameters

$data

cacheBlockRecord()

No description

getPermissionsObject() deprecated

deprecated

No description

getBlockTypeDefaultSet()

No description

getPermissionObject()

Gets the permissions object for this controller's block.

BlockRecord duplicate($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.

Parameters

$newBID

Return Value

BlockRecord $newInstance

__wakeup()

No description

setBlockObject($b)

Sets the block object for this controller.

Parameters

$b

protected load()

Loads the BlockRecord class based on its attribute names.

getBlockTypeFeatureObjects()

No description

export(SimpleXMLElement $blockNode)

No description

Parameters

SimpleXMLElement $blockNode

getBlockTypeDatabaseTable()

No description

import($page, $arHandle, SimpleXMLElement $blockNode)

No description

Parameters

$page
$arHandle
SimpleXMLElement $blockNode

protected getImportData($blockNode, $page)

No description

Parameters

$blockNode
$page

protected importAdditionalData($b, $blockNode)

No description

Parameters

$b
$blockNode

setPassThruBlockController(PageController $controller)

No description

Parameters

PageController $controller

validateAddBlockPassThruAction(Checker $ap, BlockType $bt)

No description

Parameters

Checker $ap
BlockType $bt

validateEditBlockPassThruAction(Block $b)

No description

Parameters

Block $b

validateComposerAddBlockPassThruAction(Type $type)

No description

Parameters

Type $type

validateComposerEditBlockPassThruAction(Block $b)

No description

Parameters

Block $b

getPassThruActionAndParameters($parameters)

No description

Parameters

$parameters

isValidControllerTask($method, $parameters = [])

No description

Parameters

$method
$parameters

cacheBlockOutput()

No description

cacheBlockOutputForRegisteredUsers()

No description

cacheBlockOutputOnPost()

No description

getBlockTypeCacheOutputLifetime()

No description

getCollectionObject()

No description

field($fieldName)

No description

Parameters

$fieldName

Block getBlockObject()

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

Return Value

Block $b

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.

outputAutoHeaderItems()

No description

registerViewAssets($outputContent = '')

No description

Parameters

$outputContent

setupAndRun($method)

No description

Parameters

$method

Area getAreaObject()

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

Return Value

Area $a

setAreaObject($a)

No description

Parameters

$a

uninstall()

No description

Make block's uninstallable

string getBlockTypeName()

Returns the name of the block type.

Return Value

string $btName

int getInterfaceWidth()

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

Return Value

int

int getInterfaceHeight()

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

Return Value

int

string getBlockTypeDescription()

Used for localization. If we want to localize the name/description we have to include this.

Return Value

string

getBlockTypeHelp()

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

isCopiedWhenPropagated()

No description

bool 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.

Return Value

bool

bool 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.

Return Value

bool

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 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

getJavaScriptStrings()

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

protected clearSessionControls()

No description

add()

No description

getNotifications()

No description

action_form_success($bID = null)

No description

Parameters

$bID

action_submit($bID = null)

No description

Parameters

$bID

protected loadResultsFolderInformation()

No description

action_add_control()

No description

protected saveAttributeKeySettings($controller, ExpressKey $key, $post)

No description

Parameters

$controller
ExpressKey $key
$post

action_update_control()

No description

edit()

No description

action_get_type_form()

No description

protected getAssetsDefinedDuringOutput()

No description

action_get_control()

No description

protected getFormEntity()

No description

view()

No description