Added login\register as dropbox

This commit is contained in:
Kevin Frantz 2018-07-15 08:59:24 +02:00
parent ae7c8b9278
commit c67078f88f
2 changed files with 5 additions and 3 deletions

View File

@ -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')
]; ])];
} }
} }

View File

@ -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;
} }