/** * @return Gpf_DbEngine_Row */ protected function createEmptyRow() { $row = new Pap_Db_PayoutOption(); $row->set(Gpf_Db_Table_Accounts::ID, Gpf_Application::getInstance()->getAccountId()); $row->setName($this->_("New payout option")); $row->setStatus(Pap_Db_PayoutOption::DISABLED); $row->setOrder(1); $i = 2; while ($i < 10) { try { $row->check(); break; } catch (Gpf_DbEngine_Row_CheckException $e) { $row->setName($this->_("New payout option %s", $i)); $i++; } } return $row; }
/** * @return Pap_Db_PayoutOption */ private function createPayoutOption($id, $status, $order, $name) { $option = new Pap_Db_PayoutOption(); $option->setId($id); $option->setStatus($status); $option->setOrder($order); $option->setName($name); $option->setAccountId($this->account->getId()); return $option; }