PHP Класс 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.
Автор: Mike Cochrane ([email protected])
Автор: Jan Schneider ([email protected])
Автор: Michael Slusarz ([email protected])
Наследование: implements Serializable
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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 )

Описание методов

__construct() публичный Метод

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

_loadBlocks() публичный Метод

Loads the blocks from all applications.
public _loadBlocks ( )

getBlock() публичный Метод

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.
Результат Horde_Core_Block Block object.

getBlocksList() публичный Метод

Returns a pretty printed list of all available blocks.
public getBlocksList ( ) : array
Результат array 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, 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.
Результат 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
$app string An application name.
$block string A block name.
$param string A parameter name.
Результат string The default value of the specified parameter or null.

getFixedBlocks() публичный Метод

Returns a layout with all fixed blocks as per configuration.
public getFixedBlocks ( ) : string
Результат string A default serialized block layout.

getLayout() публичный Метод

Return the layout configuration for this collection.
public getLayout ( ) : array
Результат array The layout configuration.

getLayoutManager() публичный Метод

Return the layout manager for this collection.
public getLayoutManager ( ) : Horde_Core_Block_Layout_Manager
Результат Horde_Core_Block_Layout_Manager Layout manager object.

getName() публичный Метод

Returns the name of the specified block.
public getName ( string $app, string $block ) : string
$app string An application name.
$block string A block name.
Результат 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
$app TODO
$block TODO
$param_id TODO
Результат TODO

getOptionType() публичный Метод

Returns the option type.
public getOptionType ( $app, $block, $param_id ) : TODO
$app TODO
$block TODO
$param_id TODO
Результат TODO

getOptionValues() публичный Метод

Returns the values for an option.
public getOptionValues ( $app, $block, $param_id ) : TODO
$app TODO
$block TODO
$param_id TODO
Результат TODO

getOptionsWidget() публичный Метод

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
Результат TODO

getParamName() публичный Метод

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.
Результат string The name of the specified parameter.

getParams() публичный Метод

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.
Результат array An array with all parameter names.

isEditable() публичный Метод

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.
Результат boolean True is the block is customizeable.

serialize() публичный Метод

* Serializable methods.
public serialize ( )

unserialize() публичный Метод

public unserialize ( $data )

Описание свойств

$_apps защищенное свойство

List of apps to load blocks from.
protected array $_apps
Результат array

$_blocks защищенное свойство

A hash storing the information about all available blocks from all applications.
protected array $_blocks
Результат array

$_layout защищенное свойство

Layout configuration preference name.
protected string $_layout
Результат string