35 lines
576 B
PHP
35 lines
576 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Core;
|
|
|
|
use Nette;
|
|
use Nette\Security\User;
|
|
use Nette\Http\Session;
|
|
|
|
final class ObvodyExplorer extends Nette\Database\Explorer
|
|
{
|
|
/**
|
|
* ID aktuálního sboru podle přihlášeného uživatele.
|
|
* @var int
|
|
*/
|
|
private int $sbor = 1;
|
|
|
|
public function __construct(
|
|
private User $user
|
|
) {
|
|
if ($this->user->isLoggedIn()) {
|
|
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Vrátí ID aktuálního sboru.
|
|
* @return int
|
|
*/
|
|
public function getSbor(): int
|
|
{
|
|
return $this->sbor;
|
|
}
|
|
} |