1
0

Update static helpers

This commit is contained in:
Christiaan Goossens 2017-03-29 11:39:26 +02:00
parent 550e8619d2
commit ff4d832ad5
3 changed files with 23 additions and 5 deletions

View File

@ -18,7 +18,7 @@ use Inforbank\Application;
class Klant class Klant
{ {
public function getCurrentUser() public static function getCurrentUser()
{ {
$container = Application::getContainer(); $container = Application::getContainer();
$user = $container->auth->getUserID(); $user = $container->auth->getUserID();

View File

@ -18,7 +18,7 @@ use Inforbank\Application;
class Rekeningen class Rekeningen
{ {
public function getCurrentUserRekeningen() public static function getCurrentUserRekeningen()
{ {
$container = Application::getContainer(); $container = Application::getContainer();
$user = $container->auth->getUserID(); $user = $container->auth->getUserID();
@ -32,7 +32,8 @@ class Rekeningen
foreach ($rekeningen as $rekening) { foreach ($rekeningen as $rekening) {
$returnArray[] = array( $returnArray[] = array(
"rekeningnr" => $ibanhelper->getIBAN($rekening['rekeningnr']), "iban" => $ibanhelper->getIBAN($rekening['rekeningnr']),
"nr" => $rekening['rekeningnr'],
"saldo" => (double) $rekening['saldo'] "saldo" => (double) $rekening['saldo']
); );
} }

View File

@ -1,6 +1,23 @@
<?php include '__header.phtml'; ?> <?php include '__header.phtml'; ?>
<pre><?php echo json_encode($klant); ?></pre> <table class="table">
<pre><?php echo json_encode($rekeningen); ?></pre> <tr>
<th>IBAN</th>
<th>Saldo</th>
<th>TIJDELIJK</th>
</tr>
<?php
foreach ($rekeningen as $rekening) {
?>
<tr>
<td><?php echo $rekening['iban']; ?></td>
<td><?php echo $rekening['saldo']; ?></td>
<td><?php echo $rekening['nr']; ?></td>
</tr>
<?php
}
?>
</table>
<?php include '__footer.phtml'; ?> <?php include '__footer.phtml'; ?>