1
|
<?php
|
2
|
|
3
|
namespace App\FrontModule\Presenters;
|
4
|
|
5
|
|
6
|
|
7
|
use App\FrontModule\Components\IKeyboard;
|
8
|
use App\FrontModule\Components\ITransliterationSearchFormFactory;
|
9
|
use App\FrontModule\Components\ITransliterationSearchResultListFactory;
|
10
|
use App\FrontModule\Components\ITransliterationViewFactory;
|
11
|
use App\Model\Repository\LineRepository;
|
12
|
use App\Model\Repository\LitReferenceRepository;
|
13
|
use App\Model\Repository\RevHistoryRepository;
|
14
|
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
|
/** @var LitReferenceRepository */
|
30
|
private $litReferenceRepository;
|
31
|
|
32
|
/** @var RevHistoryRepository */
|
33
|
private $revHistoryRepository;
|
34
|
|
35
|
/** @var LineRepository */
|
36
|
private $lineRepository;
|
37
|
|
38
|
/** @var ITransliterationSearchResultListFactory */
|
39
|
private $transliterationSearchResultListFactory;
|
40
|
|
41
|
/** @var IKeyboard */
|
42
|
private $keyboard;
|
43
|
/**
|
44
|
* @var ITransliterationViewFactory
|
45
|
*/
|
46
|
private $transliterationViewFactory;
|
47
|
|
48
|
public function __construct(
|
49
|
ITransliterationSearchFormFactory $transliterationSearchFormFactory,
|
50
|
TransliterationRepository $transliterationRepository,
|
51
|
TransliterationSearchModel $transliterationSearchModel,
|
52
|
LitReferenceRepository $litReferenceRepository,
|
53
|
RevHistoryRepository $revHistoryRepository,
|
54
|
LineRepository $lineRepository,
|
55
|
ITransliterationSearchResultListFactory $transliterationSearchResultListFactory,
|
56
|
IKeyboard $keyboard,
|
57
|
ITransliterationViewFactory $transliterationViewFactory
|
58
|
)
|
59
|
{
|
60
|
parent::__construct();
|
61
|
|
62
|
$this->transliterationSearchFormFactory = $transliterationSearchFormFactory;
|
63
|
$this->transliterationRepository = $transliterationRepository;
|
64
|
$this->transliterationSearchModel = $transliterationSearchModel;
|
65
|
$this->litReferenceRepository = $litReferenceRepository;
|
66
|
$this->revHistoryRepository = $revHistoryRepository;
|
67
|
$this->lineRepository = $lineRepository;
|
68
|
$this->transliterationSearchResultListFactory = $transliterationSearchResultListFactory;
|
69
|
$this->keyboard = $keyboard;
|
70
|
$this->transliterationViewFactory = $transliterationViewFactory;
|
71
|
}
|
72
|
|
73
|
public function actionView($id)
|
74
|
{
|
75
|
$this->template->id = $id;
|
76
|
}
|
77
|
|
78
|
public function createComponentTransliterationView()
|
79
|
{
|
80
|
return $this->transliterationViewFactory->create();
|
81
|
}
|
82
|
|
83
|
public function createComponentTransliterationSearchForm()
|
84
|
{
|
85
|
return $this->transliterationSearchFormFactory->create();
|
86
|
}
|
87
|
|
88
|
public function createComponentTransliterationSearchResultList()
|
89
|
{
|
90
|
return $this->transliterationSearchResultListFactory->create();
|
91
|
}
|
92
|
|
93
|
public function createComponentKeyboard()
|
94
|
{
|
95
|
return $this->keyboard->create();
|
96
|
}
|
97
|
}
|