PHP Class Horde_Core_Block_Collection, horde

Copyright 2003-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Mike Cochrane ([email protected])
Author: Jan Schneider ([email protected])
Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
Datei anzeigen Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_apps array List of apps to load blocks from.
$_blocks array A hash storing the information about all available blocks from all applications.
$_layout string Layout configuration preference name.

Public Methods

Method Description
__construct ( array $apps, string $layout ) Constructor.
_loadBlocks ( ) Loads the blocks from all applications.
getBlock ( string $app, string $name, array $params = null ) : Horde_Core_Block Gets a block object.
getBlocksList ( ) : array Returns a pretty printed list of all available blocks.
getBlocksWidget ( string $cur_app = null, string $cur_block = null, boolean $onchange = false, boolean $readonly = false ) : string Returns a select widget with all available blocks.
getDefaultValue ( string $app, string $block, string $param ) : string Returns the default value of the specified parameter.
getFixedBlocks ( ) : string Returns a layout with all fixed blocks as per configuration.
getLayout ( ) : array Return the layout configuration for this collection.
getLayoutManager ( ) : Horde_Core_Block_Layout_Manager Return the layout manager for this collection.
getName ( string $app, string $block ) : string Returns the name of the specified block.
getOptionRequired ( $app, $block, $param_id ) : TODO Returns whether the option is required or not. Defaults to true.
getOptionType ( $app, $block, $param_id ) : TODO Returns the option type.
getOptionValues ( $app, $block, $param_id ) : TODO Returns the values for an option.
getOptionsWidget ( $app, $block, $param_id, $val = null ) : TODO Returns the widget necessary to configure this block.
getParamName ( string $app, string $block, string $param ) : string Returns the (clear text) name of the specified parameter.
getParams ( string $app, string $block ) : array Returns the parameter list of the specified block.
isEditable ( string $app, string $block ) : boolean Returns if the specified block is customizeable by the user.
serialize ( ) * Serializable methods.
unserialize ( $data )

Method Details

__construct() public method

Constructor.
public __construct ( array $apps, string $layout )
$apps array The applications whose blocks to list.
$layout string Layout configuration preference name.

_loadBlocks() public method

Loads the blocks from all applications.
public _loadBlocks ( )

getBlock() public method

Gets a block object.
public getBlock ( string $app, string $name, array $params = null ) : Horde_Core_Block
$app string Application name.
$name string The Block's classname.
$params array Parameters. If null, the stored parameters will be used.
return Horde_Core_Block Block object.

getBlocksList() public method

Returns a pretty printed list of all available blocks.
public getBlocksList ( ) : array
return array A hash with block IDs as keys and application plus block block names as values.

getBlocksWidget() public method

Returns a select widget with all available blocks.
public getBlocksWidget ( string $cur_app = null, string $cur_block = null, boolean $onchange = false, boolean $readonly = false ) : string
$cur_app string The block from this application gets selected.
$cur_block string The block with this name gets selected.
$onchange boolean Include the onchange action
$readonly boolean Indicates if this block type is changeable.
return string The select tag with all available blocks.

getDefaultValue() public method

Returns the default value of the specified parameter.
public getDefaultValue ( string $app, string $block, string $param ) : string
$app string An application name.
$block string A block name.
$param string A parameter name.
return string The default value of the specified parameter or null.

getFixedBlocks() public method

Returns a layout with all fixed blocks as per configuration.
public getFixedBlocks ( ) : string
return string A default serialized block layout.

getLayout() public method

Return the layout configuration for this collection.
public getLayout ( ) : array
return array The layout configuration.

getLayoutManager() public method

Return the layout manager for this collection.
public getLayoutManager ( ) : Horde_Core_Block_Layout_Manager
return Horde_Core_Block_Layout_Manager Layout manager object.

getName() public method

Returns the name of the specified block.
public getName ( string $app, string $block ) : string
$app string An application name.
$block string A block name.
return string The name of the specified block.

getOptionRequired() public method

Returns whether the option is required or not. Defaults to true.
public getOptionRequired ( $app, $block, $param_id ) : TODO
$app TODO
$block TODO
$param_id TODO
return TODO

getOptionType() public method

Returns the option type.
public getOptionType ( $app, $block, $param_id ) : TODO
$app TODO
$block TODO
$param_id TODO
return TODO

getOptionValues() public method

Returns the values for an option.
public getOptionValues ( $app, $block, $param_id ) : TODO
$app TODO
$block TODO
$param_id TODO
return TODO

getOptionsWidget() public method

Returns the widget necessary to configure this block.
public getOptionsWidget ( $app, $block, $param_id, $val = null ) : TODO
$app TODO
$block TODO
$param_id TODO
$val TODO
return TODO

getParamName() public method

Returns the (clear text) name of the specified parameter.
public getParamName ( string $app, string $block, string $param ) : string
$app string An application name.
$block string A block name.
$param string A parameter name.
return string The name of the specified parameter.

getParams() public method

Returns the parameter list of the specified block.
public getParams ( string $app, string $block ) : array
$app string An application name.
$block string A block name.
return array An array with all parameter names.

isEditable() public method

Returns if the specified block is customizeable by the user.
public isEditable ( string $app, string $block ) : boolean
$app string An application name.
$block string A block name.
return boolean True is the block is customizeable.

serialize() public method

* Serializable methods.
public serialize ( )

unserialize() public method

public unserialize ( $data )

Property Details

$_apps protected_oe property

List of apps to load blocks from.
protected array $_apps
return array

$_blocks protected_oe property

A hash storing the information about all available blocks from all applications.
protected array $_blocks
return array

$_layout protected_oe property

Layout configuration preference name.
protected string $_layout
return string