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