35 lines
694 B
PHP
35 lines
694 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Presentation\Obvod;
|
|
|
|
use App\Model\ObvodFacade;
|
|
use App\Model\ZaznamFacade;
|
|
use Nette;
|
|
|
|
|
|
final class ObvodPresenter extends Nette\Application\UI\Presenter
|
|
{
|
|
public function __construct(
|
|
private ObvodFacade $obvod,
|
|
private ZaznamFacade $zaznam
|
|
) {
|
|
}
|
|
|
|
public function beforeRender(): void
|
|
{
|
|
}
|
|
|
|
public function renderList(): void
|
|
{
|
|
$this->template->obvody = $this->obvod->getObvody();
|
|
}
|
|
|
|
public function renderView(int $id = null): void
|
|
{
|
|
$this->template->obvod = $this->obvod->getObvod($id);
|
|
$this->template->zaznamy = $this->zaznam->getZaznamyObvodu($id);
|
|
}
|
|
}
|