public function view() { // Prepare the database query $db = Loader::db(); $sl = new SurveyList(); $slResults = $sl->getPage(); // Store data in variable stored in larger scope $this->set('surveys', $slResults); $this->set('surveyList', $sl); }
public function getCSVColumns() { $q = parent::getCSVColumns(); if (empty($this->subquestions)) { return $q; } $a = array(); for ($k = 0; $k < count($this->subquestions); $k++) { $a[$k] = $q . ' : ' . $this->subquestions[$k]; } return $a; }