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
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство 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.

Méthodes publiques

Méthode 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 méthode

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

_loadBlocks() public méthode

Loads the blocks from all applications.
public _loadBlocks ( )

getBlock() public méthode

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.
Résultat Horde_Core_Block Block object.

getBlocksList() public méthode

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

getBlocksWidget() public méthode

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.
Résultat string The select tag with all available blocks.

getDefaultValue() public méthode

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.
Résultat string The default value of the specified parameter or null.

getFixedBlocks() public méthode

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

getLayout() public méthode

Return the layout configuration for this collection.
public getLayout ( ) : array
Résultat array The layout configuration.

getLayoutManager() public méthode

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

getName() public méthode

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

getOptionRequired() public méthode

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
Résultat TODO

getOptionType() public méthode

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

getOptionValues() public méthode

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

getOptionsWidget() public méthode

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
Résultat TODO

getParamName() public méthode

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.
Résultat string The name of the specified parameter.

getParams() public méthode

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.
Résultat array An array with all parameter names.

isEditable() public méthode

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.
Résultat boolean True is the block is customizeable.

serialize() public méthode

* Serializable methods.
public serialize ( )

unserialize() public méthode

public unserialize ( $data )

Property Details

$_apps protected_oe property

List of apps to load blocks from.
protected array $_apps
Résultat array

$_blocks protected_oe property

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

$_layout protected_oe property

Layout configuration preference name.
protected string $_layout
Résultat string