Implemented product list

This commit is contained in:
Kevin Frantz
2018-07-14 23:14:06 +02:00
parent 560c70de38
commit 1bc7219caa
17 changed files with 92 additions and 50 deletions

View File

@@ -2,6 +2,7 @@
namespace controller\product;
use controller\AbstractController;
use repository\product\Product as ProductRepository;
/**
*
@@ -11,7 +12,10 @@ use controller\AbstractController;
final class Product extends AbstractController implements ProductInterface
{
public function list(): void
{}
{
$productRepository = new ProductRepository($this->core->getDatabase());
$this->render('product/list.html.twig',['products'=>$productRepository->getAllProducts()->toArray()]);
}
public function colorFilter(string $color): void
{}