Exemplo n.º 1
0
 /**
  * Load the data, don't forget to validate the incoming data
  *
  * @return	void
  */
 private function getData()
 {
     // get questions
     $this->items = FrontendFaqModel::getCategories();
     // go over categories
     foreach ($this->items as &$item) {
         // add questions info to array
         $item['questions'] = FrontendFaqModel::getQuestions($item['id']);
     }
 }
Exemplo n.º 2
0
 /**
  * Load the data, don't forget to validate the incoming data
  */
 private function getData()
 {
     $categories = FrontendFaqModel::getCategories();
     $limit = FrontendModel::getModuleSetting('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;
     }
 }