/** * Event: core.index_modify_page_title */ public function index_modify_page_title($event) { if ($this->config[prefixes::CONFIG . '_display_tagcloud_on_index']) { $this->template->assign_vars(array('RH_TOPICTAGS_DISPLAY_TAGCLOUD_ON_INDEX' => true, 'RH_TOPICTAGS_TAGCLOUD_LINK' => $this->helper->route('robertheim_topictags_controller'))); $this->tagcloud_manager->assign_tagcloud_to_template(); } }
public function test_get_top_tags() { $tags = $this->tagcloud_manager->get_top_tags(1); $this->assertEquals(array(array('tag' => 'tag1', 'count' => 2)), $tags); $tags = $this->tagcloud_manager->get_top_tags(0); $this->assertEquals(array(array('tag' => 'tag1', 'count' => 2), array('tag' => 'anothertag3', 'count' => 1), array('tag' => 'tag2', 'count' => 0)), $tags); }
/** * Controller for route /tags * * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object */ public function show() { $this->tagcloud_manager->assign_tagcloud_to_template(-1); return $this->helper->render('tags.html', 'Tags'); }