function execute(&$controller, &$request, &$user) { $tags = TagUtils::get_hot_tags(20); $cloud = new TagCloud(); foreach ($tags as $tag) { $cloud->add($tag['name'], SCRIPT_PATH . 'tag/' . urlencode($tag['name']), $tag['cnt']); } $request->setAttribute('tag_cloud', $cloud->htmlAndCSS()); return VIEW_SUCCESS; }
function execute(&$controller, &$request, &$user) { $account = $request->getParameter('account'); $tags = TagUtils::get_tags_by_account($account); $cloud = new TagCloud(); foreach ($tags as $tag) { $cloud->add($tag['name'], SCRIPT_PATH . $account . '/tag/' . urlencode($tag['name']), $tag['cnt']); } $request->setAttribute('tag_cloud', $cloud->htmlAndCSS()); return VIEW_SUCCESS; }