Documentation

Horde_Core_Block_Collection
in package
implements Serializable, JsonSerializable

This class provides an API to the blocks (applets) framework.

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.

Tags
author

Mike Cochrane mike@graftonhall.co.nz

author

Jan Schneider jan@horde.org

author

Michael Slusarz slusarz@horde.org

category

Horde

license

http://www.horde.org/licenses/lgpl21 LGPL 2.1

Table of Contents

Interfaces

Serializable
JsonSerializable

Properties

$_apps  : array<string|int, mixed>
List of apps to load blocks from.
$_blocks  : array<string|int, mixed>
A hash storing the information about all available blocks from all applications.
$_layout  : string
Layout configuration preference name.

Methods

__construct()  : mixed
Constructor.
__serialize()  : array<string|int, mixed>
__unserialize()  : void
_loadBlocks()  : mixed
Loads the blocks from all applications.
getBlock()  : Horde_Core_Block
Gets a block object.
getBlocksList()  : array<string|int, mixed>
Returns a pretty printed list of all available blocks.
getBlocksWidget()  : string
Returns a select widget with all available blocks.
getDefaultValue()  : string
Returns the default value of the specified parameter.
getFixedBlocks()  : string
Returns a layout with all fixed blocks as per configuration.
getLayout()  : array<string|int, mixed>
Return the layout configuration for this collection.
getLayoutManager()  : Horde_Core_Block_Layout_Manager
Return the layout manager for this collection.
getName()  : string
Returns the name of the specified block.
getOptionRequired()  : TODO
Returns whether the option is required or not. Defaults to true.
getOptionsWidget()  : TODO
Returns the widget necessary to configure this block.
getOptionType()  : TODO
Returns the option type.
getOptionValues()  : TODO
Returns the values for an option.
getParamName()  : string
Returns the (clear text) name of the specified parameter.
getParams()  : array<string|int, mixed>
Returns the parameter list of the specified block.
isEditable()  : bool
Returns if the specified block is customizeable by the user.
jsonSerialize()  : mixed
serialize()  : mixed
unserialize()  : mixed

Properties

$_apps

List of apps to load blocks from.

protected array<string|int, mixed> $_apps

$_blocks

A hash storing the information about all available blocks from all applications.

protected array<string|int, mixed> $_blocks

$_layout

Layout configuration preference name.

protected string $_layout

Methods

__construct()

Constructor.

public __construct(array<string|int, mixed> $apps, string $layout) : mixed
Parameters
$apps : array<string|int, mixed>

The applications whose blocks to list.

$layout : string

Layout configuration preference name.

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

_loadBlocks()

Loads the blocks from all applications.

public _loadBlocks() : mixed

getBlock()

Gets a block object.

public getBlock(string $app, string $name[, array<string|int, mixed> $params = null ]) : Horde_Core_Block
Parameters
$app : string

Application name.

$name : string

The Block's classname.

$params : array<string|int, mixed> = null

Parameters. If null, the stored parameters will be used.

Tags
throws
Horde_Exception
Return values
Horde_Core_Block

Block object.

getBlocksList()

Returns a pretty printed list of all available blocks.

public getBlocksList() : array<string|int, mixed>
Return values
array<string|int, mixed>

A hash with block IDs as keys and application plus block block names as values.

getBlocksWidget()

Returns a select widget with all available blocks.

public getBlocksWidget([string $cur_app = null ][, string $cur_block = null ][, bool $onchange = false ][, bool $readonly = false ]) : string
Parameters
$cur_app : string = null

The block from this application gets selected.

$cur_block : string = null

The block with this name gets selected.

$onchange : bool = false

Include the onchange action

$readonly : bool = false

Indicates if this block type is changeable.

Return values
string

The select tag with all available blocks.

getDefaultValue()

Returns the default value of the specified parameter.

public getDefaultValue(string $app, string $block, string $param) : string
Parameters
$app : string

An application name.

$block : string

A block name.

$param : string

A parameter name.

Return values
string

The default value of the specified parameter or null.

getFixedBlocks()

Returns a layout with all fixed blocks as per configuration.

public getFixedBlocks() : string
Return values
string

A default serialized block layout.

getLayout()

Return the layout configuration for this collection.

public getLayout() : array<string|int, mixed>
Return values
array<string|int, mixed>

The layout configuration.

getName()

Returns the name of the specified block.

public getName(string $app, string $block) : string
Parameters
$app : string

An application name.

$block : string

A block name.

Return values
string

The name of the specified block.

getOptionRequired()

Returns whether the option is required or not. Defaults to true.

public getOptionRequired( $app,  $block,  $param_id) : TODO
Parameters
$app :

TODO

$block :

TODO

$param_id :

TODO

Return values
TODO

getOptionsWidget()

Returns the widget necessary to configure this block.

public getOptionsWidget( $app,  $block,  $param_id[,  $val = null ]) : TODO
Parameters
$app :

TODO

$block :

TODO

$param_id :

TODO

$val : = null

TODO

Return values
TODO

getOptionType()

Returns the option type.

public getOptionType( $app,  $block,  $param_id) : TODO
Parameters
$app :

TODO

$block :

TODO

$param_id :

TODO

Return values
TODO

getOptionValues()

Returns the values for an option.

public getOptionValues( $app,  $block,  $param_id) : TODO
Parameters
$app :

TODO

$block :

TODO

$param_id :

TODO

Return values
TODO

getParamName()

Returns the (clear text) name of the specified parameter.

public getParamName(string $app, string $block, string $param) : string
Parameters
$app : string

An application name.

$block : string

A block name.

$param : string

A parameter name.

Return values
string

The name of the specified parameter.

getParams()

Returns the parameter list of the specified block.

public getParams(string $app, string $block) : array<string|int, mixed>
Parameters
$app : string

An application name.

$block : string

A block name.

Return values
array<string|int, mixed>

An array with all parameter names.

isEditable()

Returns if the specified block is customizeable by the user.

public isEditable(string $app, string $block) : bool
Parameters
$app : string

An application name.

$block : string

A block name.

Return values
bool

True is the block is customizeable.

unserialize()

public unserialize(mixed $data) : mixed
Parameters
$data : mixed

        
On this page

Search results