class BlockView extends AbstractView (View source)

Properties

static protected $requestInstance from  AbstractView
static protected $requestInstances from  AbstractView
protected $scopeItems from  AbstractView
$controller from  AbstractView
protected $template from  AbstractView
protected $outputAssets from  AbstractView
protected $block
protected $area
protected $blockType
protected $blockTypePkgHandle
protected $blockViewHeaderFile
protected $blockViewFooterFile
protected $outputContent
protected $viewToRender
protected $viewPerformed
protected $showControls
protected $didPullFromOutputCache

Methods

getViewTemplate()

No description

addScopeItems($items)

No description

static 
getRequestInstance()

No description

__construct($mixed = false)

No description

static 
setRequestInstance(View $v)

No description

static 
revertRequestInstance()

No description

start($state)

No description

startRender()

No description

constructView($mixed)

No description

setupRender()

No description

finishRender($contents)

No description

action(string $task)

Creates a URL that can be posted or navigated to that, when done so, will automatically run the corresponding method inside the block's controller.

addHeaderAsset($asset)

No description

addFooterAsset($asset)

No description

addOutputAsset($asset)

No description

requireAsset($assetType, $assetHandle = false)

No description

setController($controller)

No description

setViewTemplate($template)

No description

post($key, $defaultValue = null)

Returns the value of the item in the POST array.

onBeforeGetContents()

No description

postProcessViewContents($contents)

No description

onAfterGetContents()

No description

getScopeItems()

No description

render($state = false)

No description

renderViewContents($scopeItems)

No description

static string
url(string $action, string $task = null) deprecated

url is a utility function that is used inside a view to setup urls w/tasks and parameters.

setThemeByPath($path, $theme = null, $wrapper = FILENAME_THEMES_VIEW)

No description

renderError($title, $error, $errorObj = null)

No description

addHeaderItem($item)

No description

addFooterItem($item)

No description

static View
getInstance()

No description

showControls()

No description

disableControls()

No description

setAreaObject(Area $area)

No description

getAreaObject()

No description

setBlockViewHeaderFile($file)

No description

setBlockViewFooterFile($file)

No description

string
getBlockPath($filename = null) deprecated

Returns the path to the current block's directory.

string
getBlockURL($filename = null)

Returns a relative path to the current block's directory. If a filename is specified it will be appended and searched for as well.

inc($fileToInclude, $args = array())

No description

useBlockCache()

No description

field($field)

No description

usedBlockCacheDuringRender()

No description

runControllerTask()

No description

getThemePath()

Legacy.

fireOnBlockOutputEvent()

Fire an event just before the block is outputted on the page

Details

getViewTemplate()

No description

addScopeItems($items)

No description

Parameters

$items

static getRequestInstance()

No description

__construct($mixed = false)

No description

Parameters

$mixed

static protected setRequestInstance(View $v)

No description

Parameters

View $v

static protected revertRequestInstance()

No description

start($state)

No description

Parameters

$state

startRender()

No description

protected constructView($mixed)

No description

Parameters

$mixed

setupRender()

No description

finishRender($contents)

No description

Parameters

$contents

action(string $task)

Creates a URL that can be posted or navigated to that, when done so, will automatically run the corresponding method inside the block's controller.


    <a href="<?=$this->action('get_results')?>">Get the results</a>
```.

Parameters

string $task

addHeaderAsset($asset)

No description

Parameters

$asset

addFooterAsset($asset)

No description

Parameters

$asset

addOutputAsset($asset)

No description

Parameters

$asset

requireAsset($assetType, $assetHandle = false)

No description

Parameters

$assetType
$assetHandle

setController($controller)

No description

Parameters

$controller

setViewTemplate($template)

No description

Parameters

$template

post($key, $defaultValue = null)

Returns the value of the item in the POST array.

Parameters

$key
$defaultValue

protected onBeforeGetContents()

No description

postProcessViewContents($contents)

No description

Parameters

$contents

protected onAfterGetContents()

No description

getScopeItems()

No description

render($state = false)

No description

Parameters

$state

renderViewContents($scopeItems)

No description

Parameters

$scopeItems

static string url(string $action, string $task = null) deprecated

deprecated

url is a utility function that is used inside a view to setup urls w/tasks and parameters.

Parameters

string $action
string $task

Return Value

string

$url

setThemeByPath($path, $theme = null, $wrapper = FILENAME_THEMES_VIEW)

No description

Parameters

$path
$theme
$wrapper

renderError($title, $error, $errorObj = null)

No description

Parameters

$title
$error
$errorObj

addHeaderItem($item)

No description

Parameters

$item

addFooterItem($item)

No description

Parameters

$item

static View getInstance()

No description

Return Value

View

showControls()

No description

disableControls()

No description

setAreaObject(Area $area)

No description

Parameters

Area $area

getAreaObject()

No description

protected setBlockViewHeaderFile($file)

No description

Parameters

$file

protected setBlockViewFooterFile($file)

No description

Parameters

$file

string getBlockPath($filename = null) deprecated

deprecated

Returns the path to the current block's directory.

Parameters

$filename

Return Value

string

string getBlockURL($filename = null)

Returns a relative path to the current block's directory. If a filename is specified it will be appended and searched for as well.

Parameters

$filename

Return Value

string

inc($fileToInclude, $args = array())

No description

Parameters

$fileToInclude
$args

protected useBlockCache()

No description

field($field)

No description

Parameters

$field

usedBlockCacheDuringRender()

No description

runControllerTask()

No description

getThemePath()

Legacy.

private fireOnBlockOutputEvent()

Since: 8.4.1

Fire an event just before the block is outputted on the page

Custom code can modify the block contents before the block contents are 'echoed' out on the page.