/** * Parse * * @return void */ private function parse() { // get categories $tags = FrontendTagsModel::getAll(); // we just need the 10 first items $tags = array_slice($tags, 0, 10); // build link $link = FrontendNavigation::getURLForBlock('tags', 'detail'); // any tags? if (!empty($tags)) { // loop and reset url foreach ($tags as &$row) { $row['url'] = $link . '/' . $row['url']; } } // assign comments $this->tpl->assign('widgetTagsTagCloud', $tags); }
/** * Load the data from the database. * * @return void */ private function getData() { $this->tags = FrontendTagsModel::getAll(); }