View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}

{zone-data:component-name}
Zend_TagCloud
{zone-data}

{zone-data:proposer-list}
[Ben Scholzen|mailto:mail@dasprids.de]
{zone-data}

{zone-data:liaison}
[~matthew]
{zone-data}

{zone-data:revision}
1.0 - 21 November 2008: Initial Draft.
1.0 - 22 November 2008: Refactored to Zend_TagCloud.
{zone-data}

{zone-data:overview}
Zend_TagCloud is a simple component to create tag clouds from a simple array list of tags.
{zone-data}

{zone-data:references}
* [Tag Cloud calculation|http://files.blog-city.com/files/J05/88284/b/insearchofperfecttagcloud.pdf]
{zone-data}

{zone-data:requirements}
* This component *will not* limit the output to HTML.
* This component *will* allow any kind of HTML output by default.
* This component *will* let the user define the separator between the tags.
* This component *will* allow to specify the min- and max-fontsize.
* This component *will* allow to specify the unit for the fontsize.
* This component *will* alternatively support a list of classes instead of fontsizes.
{zone-data}

{zone-data:dependencies}
* Zend_Exception
{zone-data}

{zone-data:operation}
Zend_TagCloud is instantiated with an options array or Zend_Config object. You should at least supply an array of tags for the tag cloud to ronder. After that, you can call the $tagCloud->render() method or simply do "echo $tagCloud" via the magic __toString() method (not implemented in the prototype yet).
{zone-data}

{zone-data:milestones}
* Milestone 1: [DONE] Working prototype checked into user branch (http://framework.zend.com/svn/framework/standard/branches/user/dasprid/TagCloud)
* Milestone 2: Component is approved
* Milestone 3: Working prototype checked into the incubator
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists.
{zone-data}

{zone-data:class-list}
* Zend_TagCloud
* Zend_TagCloud_Exception
* Zend_TagCloud_Decorator_Exception
* Zend_TagCloud_Decorator_Cloud
* Zend_TagCloud_Decorator_Tag
* Zend_TagCloud_Decorator_HtmlCloud
* Zend_TagCloud_Decorator_HtmlTag
{zone-data}

{zone-data:use-cases}
||UC-01||

{code}
$tags = array(
array('title' => 'Tag 1',
'weight' => 50,
'url' => '/tag/1'),
array('title' => 'Tag 2',
'weight' => 20,
'url' => '/tag/2'),
array('title' => 'Tag 3',
'weight' => 34,
'url' => '/tag/3'),
);

$cloud = new Zend_TagCloud(array('tags' => $tags));
echo $cloud;
{code}
{zone-data}

{zone-data:skeletons}
Too much, see prototype:
http://framework.zend.com/svn/framework/standard/branches/user/dasprid/TagCloud
{zone-data}

{zone-template-instance}]]></ac:plain-text-body></ac:macro>