Wallet * @copyright Tamaranga */ class WalletPage extends AccountPage { public function init() { parent::init(); $this->setTitle(_t('users', 'Balance')); $this->setKey('account.settings.wallet'); $this->setTemplate('account/wallet.page', 'bills'); } public function handle() { if ($guest = $this->guestWarning()) { return $guest; } $this->noContentTitle(); return $this; } public function data() { $data = parent::data(); $data['currency'] = Currency::default(); $data['balance'] = $this->request->user()->balance(); $data['balance_formatted'] = Currency::formatPriceAndCurrency($data['balance']); return $data; } public function blocks() { $this->addBlock('payBlock', PayBlock::class); $this->addBlock('historyBlock', HistoryBlock::class); } }