Zend Framework  1.12
Public Member Functions | Protected Attributes | List of all members
Zend_Tag_Cloud Class Reference

Public Member Functions

 __construct ($options=null)
 Create a new tag cloud with options.
 
 setConfig (Zend_Config $config)
 Set options from Zend_Config.
 
 setOptions (array $options)
 Set options from array.
 
 setTags (array $tags)
 Set the tags for the tag cloud.
 
 appendTag ($tag)
 Append a single tag to the cloud.
 
 setItemList (Zend_Tag_ItemList $itemList)
 Set the item list.
 
 getItemList ()
 Retrieve the item list.
 
 setCloudDecorator ($decorator)
 Set the decorator for the cloud.
 
 getCloudDecorator ()
 Get the decorator for the cloud.
 
 setTagDecorator ($decorator)
 Set the decorator for the tags.
 
 getTagDecorator ()
 Get the decorator for the tags.
 
 setPluginLoader (Zend_Loader_PluginLoader_Interface $loader)
 Set plugin loaders for use with decorators.
 
 getPluginLoader ()
 Get the plugin loader for decorators.
 
 addPrefixPaths (array $paths)
 Add many prefix paths at once.
 
 addPrefixPath ($prefix, $path)
 Add prefix path for plugin loader.
 
 render ()
 Render the tag cloud.
 
 __toString ()
 Render the tag cloud.
 

Protected Attributes

 $_cloudDecorator = null
 
 $_tagDecorator = null
 
 $_tags = null
 
 $_pluginLoader = null
 
 $_skipOptions
 

Constructor & Destructor Documentation

__construct (   $options = null)

Create a new tag cloud with options.

Parameters
mixed$options

Member Function Documentation

__toString ( )

Render the tag cloud.

Returns
string
addPrefixPath (   $prefix,
  $path 
)

Add prefix path for plugin loader.

Parameters
string$prefix
string$path
Returns
Zend_Tag_Cloud
addPrefixPaths ( array  $paths)

Add many prefix paths at once.

Parameters
array$paths
Returns
Zend_Tag_Cloud
appendTag (   $tag)

Append a single tag to the cloud.

Parameters
Zend_Tag_Taggable | array$tag
Returns
Zend_Tag_Cloud
getCloudDecorator ( )

Get the decorator for the cloud.

Returns
Zend_Tag_Cloud_Decorator_Cloud
getItemList ( )

Retrieve the item list.

If item list is undefined, creates one.

Returns
Zend_Tag_ItemList
getPluginLoader ( )

Get the plugin loader for decorators.

Returns
Zend_Loader_PluginLoader
getTagDecorator ( )

Get the decorator for the tags.

Returns
Zend_Tag_Cloud_Decorator_Tag
render ( )

Render the tag cloud.

Returns
string
setCloudDecorator (   $decorator)

Set the decorator for the cloud.

Parameters
mixed$decorator
Returns
Zend_Tag_Cloud
setConfig ( Zend_Config  $config)

Set options from Zend_Config.

Parameters
Zend_Config$config
Returns
Zend_Tag_Cloud
setItemList ( Zend_Tag_ItemList  $itemList)

Set the item list.

Parameters
Zend_Tag_ItemList$itemList
Returns
Zend_Tag_Cloud
setOptions ( array  $options)

Set options from array.

Parameters
array$optionsConfiguration for Zend_Tag_Cloud
Returns
Zend_Tag_Cloud
setPluginLoader ( Zend_Loader_PluginLoader_Interface  $loader)

Set plugin loaders for use with decorators.

Parameters
Zend_Loader_PluginLoader_Interface$loader
Returns
Zend_Tag_Cloud
setTagDecorator (   $decorator)

Set the decorator for the tags.

Parameters
mixed$decorator
Returns
Zend_Tag_Cloud
setTags ( array  $tags)

Set the tags for the tag cloud.

$tags should be an array containing single tags as array. Each tag array should at least contain the keys 'title' and 'weight'. Optionally you may supply the key 'url', to which the tag links to. Any additional parameter in the array is silently ignored and can be used by custom decorators.

Parameters
array$tags
Returns
Zend_Tag_Cloud

Member Data Documentation

$_cloudDecorator = null
protected
$_pluginLoader = null
protected
$_skipOptions
protected
Initial value:
= array(
'options',
'config',
)
$_tagDecorator = null
protected
$_tags = null
protected