1 |
3416b114
|
Jan Šedivý
|
<?php
|
2 |
|
|
|
3 |
|
|
namespace App\FrontModule\Presenters;
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
|
7 |
6748f59e
|
Petr Lukašík
|
use App\FrontModule\Components\IKeyboard;
|
8 |
3416b114
|
Jan Šedivý
|
use App\FrontModule\Components\ITransliterationSearchFormFactory;
|
9 |
5dea830a
|
Jan Šedivý
|
use App\FrontModule\Components\ITransliterationSearchResultListFactory;
|
10 |
cddd4e21
|
Filip Jani
|
use App\FrontModule\Components\ITransliterationViewFactory;
|
11 |
8ef808c0
|
Jan Šedivý
|
use App\Model\Repository\LineRepository;
|
12 |
|
|
use App\Model\Repository\LitReferenceRepository;
|
13 |
|
|
use App\Model\Repository\RevHistoryRepository;
|
14 |
3416b114
|
Jan Šedivý
|
use App\Model\Repository\TransliterationRepository;
|
15 |
|
|
use App\Model\TransliterationSearchModel;
|
16 |
|
|
use Nette\Application\UI\Presenter;
|
17 |
|
|
|
18 |
|
|
class TransliterationPresenter extends Presenter
|
19 |
|
|
{
|
20 |
|
|
/** @var ITransliterationSearchFormFactory */
|
21 |
|
|
private $transliterationSearchFormFactory;
|
22 |
|
|
|
23 |
|
|
/** @var TransliterationRepository */
|
24 |
|
|
private $transliterationRepository;
|
25 |
|
|
|
26 |
|
|
/** @var TransliterationSearchModel */
|
27 |
|
|
private $transliterationSearchModel;
|
28 |
|
|
|
29 |
8ef808c0
|
Jan Šedivý
|
/** @var LitReferenceRepository */
|
30 |
|
|
private $litReferenceRepository;
|
31 |
|
|
|
32 |
|
|
/** @var RevHistoryRepository */
|
33 |
|
|
private $revHistoryRepository;
|
34 |
|
|
|
35 |
|
|
/** @var LineRepository */
|
36 |
|
|
private $lineRepository;
|
37 |
|
|
|
38 |
5dea830a
|
Jan Šedivý
|
/** @var ITransliterationSearchResultListFactory */
|
39 |
|
|
private $transliterationSearchResultListFactory;
|
40 |
|
|
|
41 |
6748f59e
|
Petr Lukašík
|
/** @var IKeyboard */
|
42 |
|
|
private $keyboard;
|
43 |
cddd4e21
|
Filip Jani
|
/**
|
44 |
|
|
* @var ITransliterationViewFactory
|
45 |
|
|
*/
|
46 |
|
|
private $transliterationViewFactory;
|
47 |
6748f59e
|
Petr Lukašík
|
|
48 |
3416b114
|
Jan Šedivý
|
public function __construct(
|
49 |
|
|
ITransliterationSearchFormFactory $transliterationSearchFormFactory,
|
50 |
|
|
TransliterationRepository $transliterationRepository,
|
51 |
8ef808c0
|
Jan Šedivý
|
TransliterationSearchModel $transliterationSearchModel,
|
52 |
|
|
LitReferenceRepository $litReferenceRepository,
|
53 |
|
|
RevHistoryRepository $revHistoryRepository,
|
54 |
5dea830a
|
Jan Šedivý
|
LineRepository $lineRepository,
|
55 |
6748f59e
|
Petr Lukašík
|
ITransliterationSearchResultListFactory $transliterationSearchResultListFactory,
|
56 |
cddd4e21
|
Filip Jani
|
IKeyboard $keyboard,
|
57 |
|
|
ITransliterationViewFactory $transliterationViewFactory
|
58 |
3416b114
|
Jan Šedivý
|
)
|
59 |
|
|
{
|
60 |
|
|
parent::__construct();
|
61 |
|
|
|
62 |
|
|
$this->transliterationSearchFormFactory = $transliterationSearchFormFactory;
|
63 |
|
|
$this->transliterationRepository = $transliterationRepository;
|
64 |
|
|
$this->transliterationSearchModel = $transliterationSearchModel;
|
65 |
8ef808c0
|
Jan Šedivý
|
$this->litReferenceRepository = $litReferenceRepository;
|
66 |
|
|
$this->revHistoryRepository = $revHistoryRepository;
|
67 |
|
|
$this->lineRepository = $lineRepository;
|
68 |
5dea830a
|
Jan Šedivý
|
$this->transliterationSearchResultListFactory = $transliterationSearchResultListFactory;
|
69 |
6748f59e
|
Petr Lukašík
|
$this->keyboard = $keyboard;
|
70 |
cddd4e21
|
Filip Jani
|
$this->transliterationViewFactory = $transliterationViewFactory;
|
71 |
3416b114
|
Jan Šedivý
|
}
|
72 |
|
|
|
73 |
8ef808c0
|
Jan Šedivý
|
public function actionView($id)
|
74 |
|
|
{
|
75 |
cddd4e21
|
Filip Jani
|
$this->template->id = $id;
|
76 |
|
|
}
|
77 |
|
|
|
78 |
|
|
public function createComponentTransliterationView()
|
79 |
|
|
{
|
80 |
|
|
return $this->transliterationViewFactory->create();
|
81 |
8ef808c0
|
Jan Šedivý
|
}
|
82 |
|
|
|
83 |
3416b114
|
Jan Šedivý
|
public function createComponentTransliterationSearchForm()
|
84 |
|
|
{
|
85 |
|
|
return $this->transliterationSearchFormFactory->create();
|
86 |
|
|
}
|
87 |
5dea830a
|
Jan Šedivý
|
|
88 |
|
|
public function createComponentTransliterationSearchResultList()
|
89 |
|
|
{
|
90 |
|
|
return $this->transliterationSearchResultListFactory->create();
|
91 |
|
|
}
|
92 |
6748f59e
|
Petr Lukašík
|
|
93 |
|
|
public function createComponentKeyboard()
|
94 |
|
|
{
|
95 |
|
|
return $this->keyboard->create();
|
96 |
|
|
}
|
97 |
3416b114
|
Jan Šedivý
|
}
|