Class humhub\modules\ui\view\components\View

Inheritancehumhub\modules\ui\view\components\View » yii\web\View
Subclasseshumhub\components\View

Class View

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
addCacheBustQuery() Adds cache bust query string to given url if no query is present humhub\modules\ui\view\components\View
flushJsConfig() Writes the currently registered jsConfig entries and flushes the the config array. humhub\modules\ui\view\components\View
renderHeadHtml() humhub\modules\ui\view\components\View
unregisterAjaxAssets() Unregisters standard assets on ajax requests humhub\modules\ui\view\components\View

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
BLOCK_SIDEBAR 'sidebar' The id of the sidebar block humhub\modules\ui\view\components\View

Method Details

addCacheBustQuery() protected method

Adds cache bust query string to given url if no query is present

protected string addCacheBustQuery ( $url )
$url string
return string

The URL with cache bust paramter

endBody() public method

public void endBody ( )
error() public method

public void error ( $message )
$message
flushJsConfig() protected method

Writes the currently registered jsConfig entries and flushes the the config array.

protected void flushJsConfig ( $key null )
$key string

See View::registerJs

getPageTitle() public method

Returns current page title

public string getPageTitle ( )
return string

The page title

getSidebar() public method

Returns the sidebar which is stored in the block called 'sidebar'

public string getSidebar ( )
return string

Returns the rendered sidebar

hasSidebar() public method

public boolean hasSidebar ( )
return boolean

Checks if a sidebar exists

info() public method

public void info ( $message )
$message
registerCssFile() public method

public void registerCssFile ( $url, $options = [], $key null )
$url
$options
$key
registerJsConfig() public method

public void registerJsConfig ( $module, $params null )
$module
$params
registerJsFile() public method

public void registerJsFile ( $url, $options = [], $key null )
$url
$options
$key
renderAjax() public method

public void renderAjax ( $view, $params = [], $context null )
$view
$params
$context
renderAjaxContent() public method

Renders a string as Ajax including assets.

public string renderAjaxContent ( $content )
$content string
return string

Rendered content

renderHeadHtml() protected method

protected void renderHeadHtml ( )
saved() public method

public void saved ( )
setPageTitle() public method

Sets current page title

public void setPageTitle ( $title )
$title string
setStatusMessage() public method

public void setStatusMessage ( $type, $message )
$type
$message
success() public method

public void success ( $message )
$message
unregisterAjaxAssets() protected method

Unregisters standard assets on ajax requests

protected void unregisterAjaxAssets ( )
warn() public method

public void warn ( $message )
$message