mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2024-11-22 10:11:04 +01:00
Added login\register as dropbox
This commit is contained in:
parent
ae7c8b9278
commit
c67078f88f
@ -3,6 +3,7 @@ namespace controller;
|
||||
|
||||
use router\link\Link;
|
||||
use router\Router;
|
||||
use router\link\LinkCollection;
|
||||
|
||||
/**
|
||||
* This controllers render the frames/default.html.twig
|
||||
@ -53,7 +54,7 @@ class AbstractDefaultController extends AbstractController
|
||||
], 'logout')
|
||||
];
|
||||
}
|
||||
return [
|
||||
return [new LinkCollection('login',[
|
||||
new Link([
|
||||
Router::CONTROLLER => 'user',
|
||||
Router::ACTION => 'login'
|
||||
@ -62,7 +63,7 @@ class AbstractDefaultController extends AbstractController
|
||||
Router::CONTROLLER => 'user',
|
||||
Router::ACTION => 'register'
|
||||
], 'register')
|
||||
];
|
||||
])];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,8 @@ final class LinkCollection extends ArrayCollection implements LinkCollectionInte
|
||||
*/
|
||||
private $name;
|
||||
|
||||
public function __construct(string $name){
|
||||
public function __construct(string $name,?array $links = []){
|
||||
parent::__construct($links);
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user