getAll() public static method

Fetch the list of all tags, ordered by their occurrence
public static getAll ( ) : array
return array
Beispiel #1
0
 /**
  * Parse
  */
 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);
 }
Beispiel #2
0
 /**
  * Load the data from the database.
  */
 private function getData()
 {
     $this->tags = FrontendTagsModel::getAll();
 }