Horde_Core_Ui_TagCloud
in package
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.
Tags
Table of Contents
Properties
- $basefontsize : int
- $css_class : string
- $epoc_level : array<string|int, mixed>
- $factor : int
- $fontsizerange : int
- $size_suffix : string
- $_elements : array<string|int, mixed>
- $_map : array<string|int, mixed>
- $_max : int
- $_max_epoc : int
- $_min : int
- $_min_epoc : int
Methods
- __construct() : mixed
- Constructor
- addElement() : mixed
- Add a Tag Element to build Tag Cloud.
- addElements() : mixed
- Add a Tag Element to build Tag Cloud.
- buildHTML() : string
- Build HTML part.
- clearElements() : mixed
- Clear Tag Elements.
- cmpElementsName() : int
- Using for usort().
- _buidHTMLTags() : string
- Calc Tag level and create whole HTML of each Tags.
- _calcMumCount() : mixed
- Calc max and min tag count of use.
- _calcMumEpoc() : mixed
- Calc max and min timestamp.
- _createHTMLTag() : string
- Create a Element of HTML part.
- _getCountLevel() : int
- Calc Tag Level of size.
- _getEpocLevel() : int
- Calc timeline level of Tag.
- _sortTags() : mixed
- Sort tags by name.
- _wrapDiv() : string
- Wrap div tag.
Properties
$basefontsize
public
int
$basefontsize
$css_class
public
string
$css_class
= 'tagcloud'
$epoc_level
public
array<string|int, mixed>
$epoc_level
= array('earliest', 'earlier', 'later', 'latest')
$factor
public
int
$factor
$fontsizerange
public
int
$fontsizerange
$size_suffix
public
string
$size_suffix
= 'px'
mm,cm,in,pt,pc,px,em
$_elements
protected
array<string|int, mixed>
$_elements
= array()
$_map
protected
array<string|int, mixed>
$_map
= array()
$_max
protected
int
$_max
= 0
$_max_epoc
protected
int
$_max_epoc
$_min
protected
int
$_min
= 0
$_min_epoc
protected
int
$_min_epoc
Methods
__construct()
Constructor
public
__construct([int $basefontsize = 24 ][, int $fontsizerange = 12 ]) : mixed
Parameters
- $basefontsize : int = 24
-
Base font size of output tag (option).
- $fontsizerange : int = 12
-
Font size range.
addElement()
Add a Tag Element to build Tag Cloud.
public
addElement(string $name[, string $url = '' ][, int $count = 0 ][, int $timestamp = null ][, string $onclick = null ]) : mixed
Parameters
- $name : string
-
TODO
- $url : string = ''
-
TODO
- $count : int = 0
-
TODO
- $timestamp : int = null
-
UNIX timestamp.
- $onclick : string = null
-
Javascript onclick event handler.
addElements()
Add a Tag Element to build Tag Cloud.
public
addElements(array<string|int, mixed> $tags) : mixed
Parameters
- $tags : array<string|int, mixed>
-
Associative array to $this->_elements.
buildHTML()
Build HTML part.
public
buildHTML([array<string|int, mixed> $param = array() ]) : string
Parameters
- $param : array<string|int, mixed> = array()
-
'limit' => int limit of generation tag num.
Return values
string —HTML
clearElements()
Clear Tag Elements.
public
clearElements() : mixed
cmpElementsName()
Using for usort().
public
cmpElementsName(mixed $a, mixed $b) : int
Parameters
- $a : mixed
- $b : mixed
Return values
int —TODO
_buidHTMLTags()
Calc Tag level and create whole HTML of each Tags.
protected
_buidHTMLTags(array<string|int, mixed> $param) : string
Parameters
- $param : array<string|int, mixed>
-
Limit of Tag Number.
Return values
string —HTML
_calcMumCount()
Calc max and min tag count of use.
protected
_calcMumCount() : mixed
_calcMumEpoc()
Calc max and min timestamp.
protected
_calcMumEpoc() : mixed
_createHTMLTag()
Create a Element of HTML part.
protected
_createHTMLTag(array<string|int, mixed> $tag, string $type, int $fontsize) : string
Parameters
- $tag : array<string|int, mixed>
-
TODO
- $type : string
-
CSS class of time line param.
- $fontsize : int
-
TODO
Return values
string —a Element of Tag HTML
_getCountLevel()
Calc Tag Level of size.
protected
_getCountLevel([int $count = 0 ]) : int
Parameters
- $count : int = 0
-
TODO
Return values
int —Level.
_getEpocLevel()
Calc timeline level of Tag.
protected
_getEpocLevel([int $timestamp = 0 ]) : int
Parameters
- $timestamp : int = 0
-
TODO
Return values
int —Level of timeline.
_sortTags()
Sort tags by name.
protected
_sortTags([int $limit = 0 ]) : mixed
Parameters
- $limit : int = 0
-
Limit element number of create TagCloud.
_wrapDiv()
Wrap div tag.
protected
_wrapDiv(string $html) : string
Parameters
- $html : string
-
TODO
Return values
string —TODO