Class Horde_Block_Collection

Description

The Horde_Block_Collection:: class provides an API to the blocks (applets) framework.

$Horde: framework/Block/Block/Collection.php,v 1.36.4.23 2010/07/15 16:53:50 mrubinsk Exp $

Copyright 2003-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

Located in /Block/Block/Collection.php (line 21)


	
			
Variable Summary
 array $_blocks
 string $_type
Method Summary
 static Horde_Block_Collection &singleton ([string $type = null], [array $apps = array()])
 Horde_Block_Collection Horde_Block_Collection ([string $type = null], [array $apps = array()])
 void &getBlock ( $app,  $name, [ $params = null], [ $row = null], [ $col = null])
 array getBlocksList ()
 string getBlocksWidget ([string $cur_app = null], [string $cur_block = null], [boolean $onchange = false], [boolean $readonly = false])
 string getDefaultValue (string $app, string $block, string $param)
 string getFixedBlocks ()
 string getName (string $app, string $block)
 void getOptionRequired ( $app,  $block,  $param_id)
 void getOptionsWidget ( $app,  $block,  $param_id, [ $val = null])
 void getOptionType ( $app,  $block,  $param_id)
 void &getOptionValues ( $app,  $block,  $param_id)
 string getParamName (string $app, string $block, string $param)
 array getParams (string $app, string $block)
 boolean isEditable (string $app, string $block)
 void _sortBlockCollection ( $a,  $b)
Variables
array $_blocks = array() (line 36)

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

string $_type = 'portal' (line 28)

What kind of blocks are we collecting? Defaults to any.

Methods
static singleton (line 115)

Returns a single instance of the Horde_Blocks class.

  • return: The Horde_Block_Collection instance.
static Horde_Block_Collection &singleton ([string $type = null], [array $apps = array()])
  • string $type: The kind of blocks to list.
  • array $apps: The applications whose blocks to list.
Constructor Horde_Block_Collection (line 44)

Constructor.

Horde_Block_Collection Horde_Block_Collection ([string $type = null], [array $apps = array()])
  • string $type: The kind of blocks to list.
  • array $apps: The applications whose blocks to list.
getBlock (line 127)
void &getBlock ( $app,  $name, [ $params = null], [ $row = null], [ $col = null])
  • $app
  • $name
  • $params
  • $row
  • $col
getBlocksList (line 156)

Returns a pretty printed list of all available blocks.

  • return: A hash with block IDs as keys and application plus block block names as values.
array getBlocksList ()
getBlocksWidget (line 211)

Returns a select widget with all available blocks.

  • return: The select tag with all available blocks.
string getBlocksWidget ([string $cur_app = null], [string $cur_block = null], [boolean $onchange = false], [boolean $readonly = false])
  • string $cur_app: The block from this application gets selected.
  • string $cur_block: The block with this name gets selected.
  • boolean $onchange: Indicates if the onchnage handler is included.
  • boolean $readonly: Indicates if this block's type is changeable.
getDefaultValue (line 427)

Returns the default value of the specified parameter.

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

Returns a layout with all fixed blocks as per configuration.

  • return: A default serialized block layout.
string getFixedBlocks ()
getName (line 369)

Returns the name of the specified block.

  • return: The name of the specified block.
string getName (string $app, string $block)
  • string $app: An application name.
  • string $block: A block name.
getOptionRequired (line 247)

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

void getOptionRequired ( $app,  $block,  $param_id)
  • $app
  • $block
  • $param_id
getOptionsWidget (line 269)

Returns the widget necessary to configure this block.

void getOptionsWidget ( $app,  $block,  $param_id, [ $val = null])
  • $app
  • $block
  • $param_id
  • $val
getOptionType (line 238)

Returns the option type.

void getOptionType ( $app,  $block,  $param_id)
  • $app
  • $block
  • $param_id
getOptionValues (line 260)

Returns the values for an option.

void &getOptionValues ( $app,  $block,  $param_id)
  • $app
  • $block
  • $param_id
getParamName (line 412)

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

  • return: The name of the specified parameter.
string getParamName (string $app, string $block, string $param)
  • string $app: An application name.
  • string $block: A block name.
  • string $param: A parameter name.
getParams (line 385)

Returns the parameter list of the specified block.

  • return: An array with all paramter names.
array getParams (string $app, string $block)
  • string $app: An application name.
  • string $block: A block name.
isEditable (line 444)

Returns if the specified block is customizeable by the user.

  • return: True is the block is customizeable.
boolean isEditable (string $app, string $block)
  • string $app: An application name.
  • string $block: A block name.
_sortBlockCollection (line 100)

Block sorting helper

void _sortBlockCollection ( $a,  $b)
  • $a
  • $b

Documentation generated on Sun, 30 Jan 2011 05:15:52 +0000 by phpDocumentor 1.4.3