mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-09-20 12:36:12 +02:00
tea/Classes/Controller/TeaController.php
Łukasz Uznański 4bde411dd8
[TASK] Remove author annotations (#294)
Co-authored-by: Łukasz Uznański <l.uznanski@macopedia.com>
2021-09-07 08:51:11 +02:00

35 lines
750 B
PHP

<?php
declare(strict_types=1);
namespace TTN\Tea\Controller;
use TTN\Tea\Domain\Model\Product\Tea;
use TTN\Tea\Domain\Repository\Product\TeaRepository;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
/**
* Controller for the main "Tea" FE plugin.
*/
class TeaController extends ActionController
{
/**
* @var TeaRepository
*/
private $teaRepository = null;
public function injectTeaRepository(TeaRepository $teaRepository): void
{
$this->teaRepository = $teaRepository;
}
public function indexAction(): void
{
$this->view->assign('teas', $this->teaRepository->findAll());
}
public function showAction(Tea $tea): void
{
$this->view->assign('tea', $tea);
}
}