/** * Returns the entire Section List as array * @return SectionList array */ private function getSectionList() { $sectionList = Section::find()->all(); return $sectionList; }
/** * Returns a list of all Section name * @return $sectionList array */ private function getSectionList() { $sections = Section::find()->all(); $sectionList = array(); if (!empty($sections)) { foreach ($sections as $section) { $sectionList[$section->SectionId] = $section->sectionTexts ? Html::encode($section->sectionTexts[0]->Name) : ''; } } return $sectionList; }