\Horde_View_Helper_Block

View helper for displaying Horde block objects.

All helpers hold a link back to the instance of the view. The undefined property handlers (get()/call() methods) are used to mix helpers together, effectively placing them on the same pane of glass (the view) and allowing any helper to call any other.

Summary

Methods
Properties
Constants
__construct()
__get()
__set()
__call()
blockTitle()
blockContent()
No public properties found
No constants found
_block()
_args()
$_view
$_blockCache
N/A
No private methods found
No private properties found
N/A

Properties

$_view

$_view : \Horde_View

The parent view invoking the helper.

Type

\Horde_View

$_blockCache

$_blockCache : array

Blocks that have already been fetched.

Type

array

Methods

__construct()

__construct(\Horde_View  $view) 

Creates a helper for $view.

Parameters

\Horde_View $view

The view to help.

__get()

__get(  $name) 

Proxy on undefined property access (get).

Parameters

$name

__set()

__set(  $name,   $value) 

Proxy on undefined property access (set).

Parameters

$name
$value

__call()

__call(string  $method, array  $args) : mixed

Call chaining so members of the view can be called (including other helpers).

Parameters

string $method

The method.

array $args

The parameters for the method.

Returns

mixed —

The result of the method.

blockTitle()

blockTitle() : string

Returns the title of the specified block.

Throws

\Horde_View_Exception
\InvalidArgumentException

Returns

string —

The requested Block's title.

blockContent()

blockContent() : string

Returns the content of the specified block.

Throws

\Horde_View_Exception
\InvalidArgumentException

Returns

string —

The requested Block's content.

_block()

_block(string  $block, array  $params) : \Horde_Core_Block

Instantiates and caches Block objects.

Parameters

string $block

The name of the block to fetch.

array $params

Any arguments to the Block constructor.

Throws

\Horde_View_Exception

Returns

\Horde_Core_Block —

The requested Block object.

_args()

_args(array  $args) 

Parses any argument style for the Block-fetching functions.

Parameters

array $args