/**
  * Generate the tag array and echo the cloud
  *
  * @return array
  *
  */
 public static function showCloud(array $tags, $url = '')
 {
     self::$url = $url;
     asort($tags);
     reset($tags);
     self::$smallest = current($tags);
     end($tags);
     self::$largest = current($tags);
     $diff = self::$largest - self::$smallest;
     self::$interval = round($diff / 3);
     self::$tags = $tags;
     reset(self::$tags);
     self::$cloud_tags = array();
     foreach (self::$tags as $tag => $amount) {
         echo link_to($tag, str_replace("%25tag%25", urlencode($tag), self::$url), array('class' => self::getSize($amount))) . ' ';
     }
 }
<?php

/**
 *
 * This file is part of the sfFilebasePlugin package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 *
 * @package   de.optimusprime.sfFilebasePlugin.adminArea
 * @author    Johannes Heinen <*****@*****.**>
 * @license   MIT license
 * @copyright 2007-2009 Johannes Heinen <*****@*****.**>
 */
use_stylesheet('/sfFilebasePlugin/css/cloud.css');
use_helper('tagcloud');
?>
<div class="tagcloud">
  <?php 
TagcloudHelper::showCloud($tags, $url);
?>
</div>