class PageView extends View (View source)

Traits

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 $viewPath from  View
protected $innerContentFile from  View
protected $themeHandle from  View
protected $themeObject from  View
protected $themeRelativePath from  View
protected $themeAbsolutePath from  View
protected $viewPkgHandle from  View
protected $themePkgHandle from  View
protected $viewRootDirectoryName from  View
protected $c
protected $cp
protected $pTemplateID
protected $customPreviewRequest

Methods

getViewTemplate()

No description

addScopeItems($items)

No description

static 
getRequestInstance()

No description

__construct(mixed $mixed = false)

No description

static 
setRequestInstance(View $v)

No description

static 
revertRequestInstance()

No description

start($state)

Begin the render.

from  View
startRender()

No description

constructView($page = false)

No description

setupRender()

No description

finishRender($contents)

No description

action($action)

A shortcut to posting back to the current page with a task and optional parameters. Only works in the context of.

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

from  View
postProcessViewContents($contents)

No description

from  View
onAfterGetContents()

No description

getScopeItems()

No description

render($state = false)

No description

renderViewContents($scopeItems)

No description

from  View
static string
url(string $action, string $task = null)

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

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

No description

addHeaderItem($item)

No description

addFooterItem($item)

No description

static View
getInstance()

Get an instance of the View.

void
handleRequiredFeatures(mixed $controller, Theme $theme)

Given a block or page controller that we're rendering, we request all the features required by that block controller and then add them to the page's header/footer via requireAsset, if they're not already provided by the theme (which we check via getThemeSupportedFeatures)

setPackageHandle($pkgHandle)

No description

from  View
getThemeDirectory()

No description

from  View
getViewPath()

No description

from  View
mixed
getThemeObject()

No description

from  View
string
getThemePath()

gets the relative theme path for use in templates.

from  View
getThemeHandle()

No description

from  View
setInnerContentFile($innerContentFile)

No description

from  View
mixed
getInnerContentFile()

No description

from  View
setViewRootDirectoryName($directory)

No description

from  View
inc($file, $args = [])

No description

from  View
setViewTheme($theme)

No description

from  View
getViewTemplateFile()

No description

from  View
loadViewThemeObject()

Load all the theme-related variables for which theme to use for this request. May update the themeHandle property on the view based on themeByRoute settings.

from  View
string
renderInnerContents($scopeItems)

Render the file set to $this->innerContentFile

from  View
string
renderTemplate($scopeItems, $innerContent)

Render the file set to $this->template

from  View
markHeaderAssetPosition()

Function responsible for outputting header items.

from  View
markFooterAssetPosition()

Function responsible for outputting footer items.

from  View
getAssetsToOutput()

No description

from  View
postProcessAssets($assets)

No description

from  View
replaceEmptyAssetPlaceholders($pageContent)

No description

from  View
replaceAssetPlaceholders($outputAssets, $pageContent)

No description

from  View
outputAssetIntoView($item)

No description

from  View
getThemeStyles()

No description

static 
element($_file, $args = null, $_pkgHandle = null)

No description

from  View
getPageTemplate()

No description

renderSinglePageByFilename($cFilename, $pkgHandle = null)

No description

getCollectionObject() deprecated

No description

getPageObject()

No description

section($url)

No description

setCustomPageTheme(PageTheme $pt)

No description

void
setCustomPreviewRequest(PreviewRequestInterface $customPreviewRequest)

No description

string
getStyleSheet($stylesheet) deprecated

No description

Details

getViewTemplate()

No description

addScopeItems($items)

No description

Parameters

$items

static getRequestInstance()

No description

__construct(mixed $mixed = false)

No description

Parameters

mixed $mixed

object to view

static protected setRequestInstance(View $v)

No description

Parameters

View $v

static protected revertRequestInstance()

No description

start($state)

Begin the render.

Parameters

$state

startRender()

No description

protected constructView($page = false)

No description

Parameters

$page

setupRender()

No description

finishRender($contents)

No description

Parameters

$contents

action($action)

A shortcut to posting back to the current page with a task and optional parameters. Only works in the context of.

Parameters

$action

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)

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

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

Get an instance of the View.

Note: In versions before 8.5.0a3, this method may return 'false' if it's called after the page is rendered (for example in middleware).

Return Value

View

protected void handleRequiredFeatures(mixed $controller, Theme $theme)

Given a block or page controller that we're rendering, we request all the features required by that block controller and then add them to the page's header/footer via requireAsset, if they're not already provided by the theme (which we check via getThemeSupportedFeatures)

Parameters

mixed $controller
Theme $theme

Return Value

void

setPackageHandle($pkgHandle)

No description

Parameters

$pkgHandle

getThemeDirectory()

No description

getViewPath()

No description

mixed getThemeObject()

No description

Return Value

mixed

string getThemePath()

gets the relative theme path for use in templates.

Return Value

string

$themePath

getThemeHandle()

No description

setInnerContentFile($innerContentFile)

No description

Parameters

$innerContentFile

mixed getInnerContentFile()

No description

Return Value

mixed

setViewRootDirectoryName($directory)

No description

Parameters

$directory

inc($file, $args = [])

No description

Parameters

$file
$args

setViewTheme($theme)

No description

Parameters

$theme

getViewTemplateFile()

No description

protected loadViewThemeObject()

Load all the theme-related variables for which theme to use for this request. May update the themeHandle property on the view based on themeByRoute settings.

protected string renderInnerContents($scopeItems)

Render the file set to $this->innerContentFile

Parameters

$scopeItems

Return Value

string

protected string renderTemplate($scopeItems, $innerContent)

Render the file set to $this->template

Parameters

$scopeItems
$innerContent

Return Value

string

markHeaderAssetPosition()

Function responsible for outputting header items.

markFooterAssetPosition()

Function responsible for outputting footer items.

protected getAssetsToOutput()

No description

protected postProcessAssets($assets)

No description

Parameters

$assets

protected replaceEmptyAssetPlaceholders($pageContent)

No description

Parameters

$pageContent

protected replaceAssetPlaceholders($outputAssets, $pageContent)

No description

Parameters

$outputAssets
$pageContent

protected outputAssetIntoView($item)

No description

Parameters

$item

getThemeStyles()

No description

static element($_file, $args = null, $_pkgHandle = null)

No description

Parameters

$_file
$args
$_pkgHandle

getPageTemplate()

No description

renderSinglePageByFilename($cFilename, $pkgHandle = null)

No description

Parameters

$cFilename
$pkgHandle

getCollectionObject() deprecated

deprecated

No description

getPageObject()

No description

section($url)

No description

Parameters

$url

setCustomPageTheme(PageTheme $pt)

No description

Parameters

PageTheme $pt

void setCustomPreviewRequest(PreviewRequestInterface $customPreviewRequest)

No description

Parameters

PreviewRequestInterface $customPreviewRequest

Return Value

void

string getStyleSheet($stylesheet) deprecated

deprecated

No description

Parameters

$stylesheet

Return Value

string