47 switch ($this->ctrl()->getNextClass()) {
49 $cmd = $this->ctrl()->getCmd(self::CMD_DEFAULT);
60 $this->tpl()->setContent(
$table->getHTML());
66 $this->toolbar()->addButton($this->lng()->txt(
"obj_add_languages"), $this->ctrl()
67 ->getLinkTarget($this, self::CMD_ADD_LANGUAGE));
73 $to_translate = (array) $this->
http()->request()->getParsedBody()[self::P_TRANSLATIONS];
74 foreach ($to_translate as
$id =>
$data) {
75 $translation = $this->facade->translationFactory()->findById(
$id);
76 $translation->setTranslation(
$data[
'translation']);
77 $translation->setDescription(
$data[
'description']);
78 $translation->store();
87 $to_delete = (array) $this->
http()->request()->getParsedBody()[self::P_DELETE];
88 foreach ($to_delete as
$id) {
89 $this->facade->translationFactory()->deleteById($id);
100 $this->tpl()->setContent(
$form->getHTML());
107 if (
$form->checkInput()) {
108 $ad =
$form->getInput(
"additional_langs");
110 foreach ($ad as $language_key) {
111 $this->facade->translationFactory()
112 ->findArCreateInstanceForFieldAndlanguage($this->field, $language_key);
120 $form->setValuesByPost();
121 $this->tpl()->setContent(
$form->getHTML());
131 $form->setFormAction($this->ctrl()->getFormAction($this));
148 $form->setTitle($this->lng()->txt(
"obj_add_languages"));
149 $form->addCommandButton(self::CMD_SAVE_LANGUAGES, $this->lng()->txt(
"save"));
150 $form->addCommandButton(self::CMD_DEFAULT, $this->lng()->txt(
"cancel"));
158 $this->ctrl()->redirect($this, self::CMD_DEFAULT);
Interface ilBiblFactoryFacadeInterface.
Interface ilBiblEntryInterface.
if(!array_key_exists('StateId', $_REQUEST)) $id
Class ilBiblTranslationGUI.
Class ilBiblTranslationTableGUI.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static http()
Fetches the global http state from ILIAS.
if(isset($_POST['submit'])) $form
const CMD_DELETE_TRANSLATIONS
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
if(empty($password)) $table
__construct(ilBiblAdminFactoryFacadeInterface $facade, \ilBiblFieldInterface $field)
ilBiblTranslationGUI constructor.
const CMD_SAVE_TRANSLATIONS