\Horde_Core_Block

An abstract class representing a single block in the portal/block display.

Copyright 2003-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
getApp()
getName()
getParams()
getParamValues()
getTitle()
getContent()
refreshContent()
getAjaxUpdate()
$enabled
$updateable
$autoUpdateMethod
No constants found
_params()
_title()
_content()
_refreshContent()
_ajaxUpdate()
_ajaxUpdateUrl()
_call()
$_app
$_name
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$enabled

$enabled : boolean

Is this block enabled?

Type

boolean

$updateable

$updateable : boolean

Whether this block has changing content.

Type

boolean

$autoUpdateMethod

$autoUpdateMethod : string

The method to use to render the block when Horde_Ajax_Application_Handler#blockAutoUpdate is called instead of the default of Horde_Core_Block#getContent By default, we call _content()

Type

string

$_app

$_app : string

Application that this block originated from.

Type

string

$_name

$_name : string

Block name. Should be set in the constructor.

Type

string

$_params

$_params : array

Block specific parameters.

Type

array

Methods

__construct()

__construct(string  $app, array|boolean  $params = array()) 

Constructor.

Parameters

string $app

The application name.

array|boolean $params

Any parameters the block needs. If false, the default parameter will be used.

getApp()

getApp() : string

Returns the application that this block belongs to.

Returns

string —

The application name.

getName()

getName() : string

Return the block name.

Returns

string —

The block name.

getParams()

getParams() : array

Returns any settable parameters for this block.

It does not reference $this->_params; that is for runtime parameters (the choices made from these options).

Returns

array —

The block's configurable parameters.

getParamValues()

getParamValues() : array

Returns a hash of block parameters and their configured values.

Returns

array —

Parameter values.

getTitle()

getTitle() : string

Returns the text to go in the title of this block.

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.

Returns

string —

The block's title.

getContent()

getContent() : string

Returns the content for this block.

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.

Returns

string —

The block's content.

refreshContent()

refreshContent(\Horde_Variables  $vars) : string

Returns the content for this block in response to a user requested update from within the block.

This function handles the changing of current application as needed so code is executed in the scope of the application the block originated from.

Parameters

\Horde_Variables $vars

Returns

string —

The block's content.

getAjaxUpdate()

getAjaxUpdate(\Horde_Variables  $vars) : string

The data to send on an AJAX update request.

Parameters

\Horde_Variables $vars

The form variables for the request.

Returns

string —

Update data.

_params()

_params() : array

Returns the parameters needed by block.

Returns

array —

The block's parameters.

_title()

_title() : string

Returns the title to go in this block.

Returns

string —

The block title.

_content()

_content() : string

Returns this block's content.

Returns

string —

The block's content.

_refreshContent()

_refreshContent(\Horde_Variables  $vars) : string

Stub to be overridden by concrete block that supports user-initiated updating of content via ajax.

Parameters

\Horde_Variables $vars

Returns

string

_ajaxUpdate()

_ajaxUpdate(\Horde_Variables  $vars) : string

Returns this block's content for AJAX updates.

Parameters

\Horde_Variables $vars

The form variables for the request.

Returns

string —

The update content.

_ajaxUpdateUrl()

_ajaxUpdateUrl() : \Horde_Url

Return the URL to use for AJAX update requests.

Returns

\Horde_Url —

The update URL.

_call()

_call(string  $name, mixed  $default, mixed  $args = null) : mixed

Calls the application driver in the proper context.

Parameters

string $name

string

mixed $default
mixed $args

Returns

mixed