getDefaultAccount ( )
inherited

Returns a default, hidden CesBankLocalAccount as model for new accounts.

Returns
CesBankLocalAccount Account to be used as a model for new accounts.

References CesBankExchange\getFreeAccountName().

1573  {
1574  $record = array(
1575  'exchange' => $this->id,
1576  'name' => $this->getFreeAccountName(),
1577  'balance' => 0.0,
1578  'state' => CesBankLocalAccount::STATE_HIDDEN,
1579  'kind' => CesBankLocalAccount::TYPE_INDIVIDUAL,
1580  'limitchain' => $this->limitchain,
1581  'users' => array(
1582  array(
1583  'account' => NULL,
1584  'user' => 0,
1585  'role' => CesBankAccountUser::ROLE_ACCOUNT_ADMINISTRATOR,
1586  ),
1587  ),
1588  );
1589  $s = new IcesSerializer('CesBankLocalAccount');
1590  $account = $s->loadFromRecord($record);
1591  return $account;
1592  }
Loads and saves to db objects of class IcesDBObject.
Definition: common.db.logic.inc:17
getFreeAccountName()
GetFreeAccountName.
Definition: ces_bank.logic.inc:1601