PHP Class Horde_Core_Ui_TagCloud, horde

Based on a striped down version of Pear's HTML_TagCloud Copyright 2009-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.
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$basefontsize integer
$css_class string
$epoc_level array
$factor integer
$fontsizerange integer
$size_suffix string mm,cm,in,pt,pc,px,em

Protected Properties

Свойство Type Description
$_elements array
$_map array
$_max integer
$_max_epoc integer
$_min integer
$_min_epoc integer

Méthodes publiques

Méthode Description
__construct ( integer $basefontsize = 24, integer $fontsizerange = 12 ) Constructor
addElement ( string $name, string $url = '', integer $count, integer $timestamp = null, string $onclick = null ) Add a Tag Element to build Tag Cloud.
addElements ( array $tags ) Add a Tag Element to build Tag Cloud.
buildHTML ( array $param = [] ) : string Build HTML part.
clearElements ( ) Clear Tag Elements.
cmpElementsName ( $a, $b ) : integer Using for usort().

Méthodes protégées

Méthode Description
_buidHTMLTags ( array $param ) : string Calc Tag level and create whole HTML of each Tags.
_calcMumCount ( ) Calc max and min tag count of use.
_calcMumEpoc ( ) Calc max and min timestamp.
_createHTMLTag ( array $tag, string $type, integer $fontsize ) : string Create a Element of HTML part.
_getCountLevel ( integer $count ) : integer Calc Tag Level of size.
_getEpocLevel ( integer $timestamp ) : integer Calc timeline level of Tag.
_sortTags ( integer $limit ) Sort tags by name.
_wrapDiv ( string $html ) : string Wrap div tag.

Method Details

__construct() public méthode

Constructor
public __construct ( integer $basefontsize = 24, integer $fontsizerange = 12 )
$basefontsize integer Base font size of output tag (option).
$fontsizerange integer Font size range.

_buidHTMLTags() protected méthode

Calc Tag level and create whole HTML of each Tags.
protected _buidHTMLTags ( array $param ) : string
$param array Limit of Tag Number.
Résultat string HTML

_calcMumCount() protected méthode

Calc max and min tag count of use.
protected _calcMumCount ( )

_calcMumEpoc() protected méthode

Calc max and min timestamp.
protected _calcMumEpoc ( )

_createHTMLTag() protected méthode

Create a Element of HTML part.
protected _createHTMLTag ( array $tag, string $type, integer $fontsize ) : string
$tag array TODO
$type string CSS class of time line param.
$fontsize integer TODO
Résultat string a Element of Tag HTML

_getCountLevel() protected méthode

Calc Tag Level of size.
protected _getCountLevel ( integer $count ) : integer
$count integer TODO
Résultat integer Level.

_getEpocLevel() protected méthode

Calc timeline level of Tag.
protected _getEpocLevel ( integer $timestamp ) : integer
$timestamp integer TODO
Résultat integer Level of timeline.

_sortTags() protected méthode

Sort tags by name.
protected _sortTags ( integer $limit )
$limit integer Limit element number of create TagCloud.

_wrapDiv() protected méthode

Wrap div tag.
protected _wrapDiv ( string $html ) : string
$html string TODO
Résultat string TODO

addElement() public méthode

Add a Tag Element to build Tag Cloud.
public addElement ( string $name, string $url = '', integer $count, integer $timestamp = null, string $onclick = null )
$name string TODO
$url string TODO
$count integer TODO
$timestamp integer UNIX timestamp.
$onclick string Javascript onclick event handler.

addElements() public méthode

Add a Tag Element to build Tag Cloud.
public addElements ( array $tags )
$tags array Associative array to $this->_elements.

buildHTML() public méthode

Build HTML part.
public buildHTML ( array $param = [] ) : string
$param array 'limit' => int limit of generation tag num.
Résultat string HTML

clearElements() public méthode

Clear Tag Elements.
public clearElements ( )

cmpElementsName() public méthode

Using for usort().
public cmpElementsName ( $a, $b ) : integer
Résultat integer TODO

Property Details

$_elements protected_oe property

protected array $_elements
Résultat array

$_map protected_oe property

protected array $_map
Résultat array

$_max protected_oe property

protected int $_max
Résultat integer

$_max_epoc protected_oe property

protected int $_max_epoc
Résultat integer

$_min protected_oe property

protected int $_min
Résultat integer

$_min_epoc protected_oe property

protected int $_min_epoc
Résultat integer

$basefontsize public_oe property

public int $basefontsize
Résultat integer

$css_class public_oe property

public string $css_class
Résultat string

$epoc_level public_oe property

public array $epoc_level
Résultat array

$factor public_oe property

public int $factor
Résultat integer

$fontsizerange public_oe property

public int $fontsizerange
Résultat integer

$size_suffix public_oe property

mm,cm,in,pt,pc,px,em
public string $size_suffix
Résultat string