public function getGroups() { $this->output = array(); foreach (Tlegroup::find('all') as $group) { $this->output[] = array('id' => $group->id, 'name' => $group->name, 'selected' => $group->default ? true : false); } }
public function updateAll() { $groups = Tlegroup::find('all'); foreach ($groups as $group) { $groupFilename = $group->id . '.txt'; $this->updateGroup($groupFilename); } }