protected function setupForm() { $gathering = false; $activeSources = array(); if ($this->gaID) { $gathering = Gathering::getByID($this->gaID); $activeSources = $gathering->getConfiguredGatheringDataSources(); } $availableSources = GatheringDataSource::getList(); $this->set('availableSources', $availableSources); $this->set('activeSources', $activeSources); $this->set('gathering', $gathering); }