mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-09 19:37:12 +02:00
Implemented product list
This commit is contained in:
@@ -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
|
||||
{}
|
||||
|
Reference in New Issue
Block a user