getCategories() public static method

Get all categories
public static getCategories ( ) : array
return array
Beispiel #1
0
 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     $categories = FrontendFaqModel::getCategories();
     $limit = $this->get('fork.settings')->get('Faq', 'overview_num_items_per_category', 10);
     foreach ($categories as $item) {
         $item['questions'] = FrontendFaqModel::getAllForCategory($item['id'], $limit);
         // no questions? next!
         if (empty($item['questions'])) {
             continue;
         }
         // add the category item including the questions
         $this->items[] = $item;
     }
 }
Beispiel #2
0
 /**
  * Parse
  */
 private function parse()
 {
     $this->tpl->assign('widgetFaqCategories', FrontendFaqModel::getCategories());
 }