/** * Returns fields for provided account type. * Method is used in admin panel. * * @param string $accountType * @return array */ public function findAllQuestionsBySectionForAccountType($accountType) { $questionList = $this->questionDao->findAllQuestionsWithSectionForAccountType($accountType); $list = array(); foreach ($questionList as $question) { $list[$question['sectionName']][] = $question; } $sections = $this->sectionDao->findSortedSectionList(); $result = array(); /* @var $section BOL_QuestionSection */ foreach ($sections as $section) { if (!$section->isHidden) { $result[$section->name] = !empty($list[$section->name]) ? $list[$section->name] : array(); } } return $result; }
/** * Returns fields for provided account type. * Method is used in admin panel. * * @param string $accountType * @return array */ public function findAllQuestionsWithSectionForAccountType($accountType) { return $this->questionDao->findAllQuestionsWithSectionForAccountType($accountType); }