Revize a8141f46
Přidáno uživatelem Filip Jani před téměř 6 roky(ů)
app/AdminModule/presenters/TransliterationPresenter.php | ||
---|---|---|
7 | 7 |
use App\AdminModule\Components\ITransliterationDataEditFormFactory; |
8 | 8 |
use App\AdminModule\Components\ITransliterationGridFactory; |
9 | 9 |
use App\AdminModule\Components\ITransliterationEditFormFactory; |
10 |
use App\Enum\EFlashMessage; |
|
10 | 11 |
use App\Model\Repository\TransliterationRepository; |
11 | 12 |
|
12 | 13 |
class TransliterationPresenter extends BaseUserPresenter |
... | ... | |
67 | 68 |
{ |
68 | 69 |
$this['transliterationEditForm']->setTransliteration($id); |
69 | 70 |
$this['transliterationDataEditForm']->setTransliteration($id); |
71 |
$this->template->id = $id; |
|
72 |
} |
|
73 |
|
|
74 |
/** |
|
75 |
* Akce pro odstranění transliterace |
|
76 |
* |
|
77 |
* @param int $id |
|
78 |
* @throws \Nette\Application\AbortException |
|
79 |
*/ |
|
80 |
public function actionDeleteTransliteration(int $id) |
|
81 |
{ |
|
82 |
if ($this->transliterationRepository->findRow($id)->delete()) |
|
83 |
{ |
|
84 |
$this->flashMessage('Transliteration was removed.', EFlashMessage::SUCCESS); |
|
85 |
} else |
|
86 |
{ |
|
87 |
$this->flashMessage('Transliteration was not found', EFlashMessage::ERROR); |
|
88 |
} |
|
89 |
|
|
90 |
$this->redirect('Transliteration:'); |
|
70 | 91 |
} |
71 | 92 |
|
72 | 93 |
public function createComponentTransliterationGrid() |
Také k dispozici: Unified diff
Re #7593 odstraňování book type a transliterací