ILIAS  release_8 Revision v8.24
class.ilAssQuestionPreviewToolbarGUI.php
Go to the documentation of this file.
1<?php
2
26{
29 private $editPageCmd;
30
31 public function __construct(ilLanguage $lng)
32 {
33 $this->lng = $lng;
34
36 }
37
38 public function build(): void
39 {
40 // Edit Question
41 if ($this->getEditQuestionCmd() !== null) {
42 $button_edit_question = ilLinkButton::getInstance();
43 $button_edit_question->setUrl($this->getEditQuestionCmd());
44 $button_edit_question->setPrimary(true);
45 $button_edit_question->setCaption('edit_question');
46 $this->addButtonInstance($button_edit_question);
47 }
48
49 // Edit Page
50 if ($this->getEditPageCmd() !== null) {
51 $button_edit_page = ilLinkButton::getInstance();
52 $button_edit_page->setUrl($this->getEditPageCmd());
53 $button_edit_page->setCaption('edit_page');
54 $this->addButtonInstance($button_edit_page);
55 }
56
57 //Reset Preview
59 $button->setCaption("qpl_reset_preview");
60 $button->setCommand($this->getResetPreviewCmd());
61 $button->setOmitPreventDoubleSubmission(true);
62 $this->addButtonInstance($button);
63 //$this->addFormButton($this->lng->txt('qpl_reset_preview'), $this->getResetPreviewCmd(), '', false);
64 }
65
66 public function setResetPreviewCmd($resetPreviewCmd): void
67 {
68 $this->resetPreviewCmd = $resetPreviewCmd;
69 }
70
71 public function getResetPreviewCmd()
72 {
74 }
75
79 public function getEditQuestionCmd()
80 {
82 }
83
87 public function setEditQuestionCmd($editQuestionCmd): void
88 {
89 $this->editQuestionCmd = $editQuestionCmd;
90 }
91
95 public function getEditPageCmd()
96 {
97 return $this->editPageCmd;
98 }
99
103 public function setEditPageCmd($editPageCmd): void
104 {
105 $this->editPageCmd = $editPageCmd;
106 }
107}
language handling
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addButtonInstance(ilButtonBase $a_button)
Add button instance.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc