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

addScopeItems($items)

Parameters

$items

static getRequestInstance()

__construct($mixed = false)

Parameters

$mixed

static protected setRequestInstance(View $v)

Parameters

View $v

static protected revertRequestInstance()

start($state)

Parameters

$state

startRender()

protected constructView($mixed)

Parameters

$mixed

setupRender()

finishRender($contents)

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.

Get the results .

Parameters

string $task

addHeaderAsset($asset)

Parameters

$asset

addFooterAsset($asset)

Parameters

$asset

addOutputAsset($asset)

Parameters

$asset

requireAsset($assetType, $assetHandle = false)

Parameters

$assetType
$assetHandle

setController($controller)

Parameters

$controller

setViewTemplate($template)

Parameters

$template

post($key, $defaultValue = null)

Returns the value of the item in the POST array.

Parameters

$key
$defaultValue

protected onBeforeGetContents()

postProcessViewContents($contents)

Parameters

$contents

protected onAfterGetContents()

getScopeItems()

render($state = false)

Parameters

$state

renderViewContents($scopeItems)

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)

Parameters

$path
$theme
$wrapper

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

Parameters

$title
$error
$errorObj

addHeaderItem($item)

Parameters

$item

addFooterItem($item)

Parameters

$item

static View getInstance()

Return Value

View

showControls()

disableControls()

setAreaObject(Area $area)

Parameters

Area $area

getAreaObject()

protected setBlockViewHeaderFile($file)

Parameters

$file

protected setBlockViewFooterFile($file)

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

Parameters

$fileToInclude
$args

protected useBlockCache()

field($field)

Parameters

$field

usedBlockCacheDuringRender()

runControllerTask()

getThemePath()

Legacy.

private fireOnBlockOutputEvent()

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.