Added base page layout
This commit is contained in:
		
							
								
								
									
										41
									
								
								src/Application/Helper/Klant.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/Application/Helper/Klant.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 *  Informatica Eindproject D4p
 | 
			
		||||
 *  6in3, Stedelijk Gymnasium Nijmegen
 | 
			
		||||
 *  Docent: Hans de Wolf
 | 
			
		||||
 *
 | 
			
		||||
 *  ==================
 | 
			
		||||
 *
 | 
			
		||||
 *  Daniel Boutros,
 | 
			
		||||
 *  Christiaan Goossens,
 | 
			
		||||
 *  Jelmer Hinssen
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
namespace Inforbank\Application\Helper;
 | 
			
		||||
 | 
			
		||||
use Inforbank\Application;
 | 
			
		||||
 | 
			
		||||
class Klant
 | 
			
		||||
{
 | 
			
		||||
    public function getCurrentUser()
 | 
			
		||||
    {
 | 
			
		||||
        $container = Application::getContainer();
 | 
			
		||||
        $user = $container->auth->getUserID();
 | 
			
		||||
 | 
			
		||||
        $db = $container->db;
 | 
			
		||||
 | 
			
		||||
        $klant = $db->klanten->where('id', $user)[$user];
 | 
			
		||||
 | 
			
		||||
        return array(
 | 
			
		||||
            'voornaam' => $klant['voornaam'],
 | 
			
		||||
            'tussenvoegsel' => $klant['tussenvoegsel'],
 | 
			
		||||
            'achternaam' => $klant['achternaam'],
 | 
			
		||||
            'bedrijfsnaam' => $klant['bedrijfsnaam'],
 | 
			
		||||
            'straat' => $klant['straat'],
 | 
			
		||||
            'huisnummer' => $klant['huisnummer'],
 | 
			
		||||
            'postcode' => $klant['postcode'],
 | 
			
		||||
            'woonplaats' => $klant['woonplaats']
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user