\Horde_Core_Ui_TagCloud

Horde_Core_Ui_TagCloud:: for creating and displaying tag clouds.

Based on a striped down version of Pear's HTML_TagCloud

Copyright 2009-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
addElement()
addElements()
clearElements()
buildHTML()
cmpElementsName()
$basefontsize
$fontsizerange
$css_class
$size_suffix
$factor
$epoc_level
No constants found
_buidHTMLTags()
_createHTMLTag()
_sortTags()
_calcMumCount()
_calcMumEpoc()
_getCountLevel()
_getEpocLevel()
_wrapDiv()
$_elements
$_max
$_min
$_max_epoc
$_min_epoc
$_map
N/A
No private methods found
No private properties found
N/A

Properties

$basefontsize

$basefontsize : integer

Type

integer

$fontsizerange

$fontsizerange : integer

Type

integer

$css_class

$css_class : string

Type

string

$size_suffix

$size_suffix : string

Type

string — mm,cm,in,pt,pc,px,em

$factor

$factor : integer

Type

integer

$epoc_level

$epoc_level : array

Type

array

$_elements

$_elements : array

Type

array

$_max

$_max : integer

Type

integer

$_min

$_min : integer

Type

integer

$_max_epoc

$_max_epoc : integer

Type

integer

$_min_epoc

$_min_epoc : integer

Type

integer

$_map

$_map : array

Type

array

Methods

__construct()

__construct(integer  $basefontsize = 24, integer  $fontsizerange = 12) 

Constructor

Parameters

integer $basefontsize

Base font size of output tag (option).

integer $fontsizerange

Font size range.

addElement()

addElement(string  $name, string  $url = '', integer  $count, integer  $timestamp = null, string  $onclick = null) 

Add a Tag Element to build Tag Cloud.

Parameters

string $name

TODO

string $url

TODO

integer $count

TODO

integer $timestamp

UNIX timestamp.

string $onclick

Javascript onclick event handler.

addElements()

addElements(array  $tags) 

Add a Tag Element to build Tag Cloud.

Parameters

array $tags

Associative array to $this->_elements.

clearElements()

clearElements() 

Clear Tag Elements.

buildHTML()

buildHTML(array  $param = array()) : string

Build HTML part.

Parameters

array $param

'limit' => int limit of generation tag num.

Returns

string —

HTML

cmpElementsName()

cmpElementsName(  $a,   $b) : integer

Using for usort().

Parameters

$a
$b

Returns

integer —

TODO

_buidHTMLTags()

_buidHTMLTags(array  $param) : string

Calc Tag level and create whole HTML of each Tags.

Parameters

array $param

Limit of Tag Number.

Returns

string —

HTML

_createHTMLTag()

_createHTMLTag(array  $tag, string  $type, integer  $fontsize) : string

Create a Element of HTML part.

Parameters

array $tag

TODO

string $type

CSS class of time line param.

integer $fontsize

TODO

Returns

string —

a Element of Tag HTML

_sortTags()

_sortTags(integer  $limit) 

Sort tags by name.

Parameters

integer $limit

Limit element number of create TagCloud.

_calcMumCount()

_calcMumCount() 

Calc max and min tag count of use.

_calcMumEpoc()

_calcMumEpoc() 

Calc max and min timestamp.

_getCountLevel()

_getCountLevel(integer  $count) : integer

Calc Tag Level of size.

Parameters

integer $count

TODO

Returns

integer —

Level.

_getEpocLevel()

_getEpocLevel(integer  $timestamp) : integer

Calc timeline level of Tag.

Parameters

integer $timestamp

TODO

Returns

integer —

Level of timeline.

_wrapDiv()

_wrapDiv(string  $html) : string

Wrap div tag.

Parameters

string $html

TODO

Returns

string —

TODO