function setStation($id) { $id = trim($id); $slf = new StationListFactory(); if ($id != 0 or $this->Validator->isResultSetWithRows('station', $slf->getByID($id), TTi18n::gettext('Station is invalid'))) { $this->data['station_id'] = $id; return TRUE; } return FALSE; }