ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilAssQuestionPreviewToolbarGUI.php
Go to the documentation of this file.
1 <?php
18 require_once 'Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
19 
27 {
31  public $lng = null;
32 
41  private $editPageCmd = null;
42 
43  public function __construct(ilLanguage $lng)
44  {
45  $this->lng = $lng;
46 
48  }
49 
50  public function build()
51  {
52  // Edit Question
53  if ($this->getEditQuestionCmd() !== null) {
54  $button_edit_question = ilLinkButton::getInstance();
55  $button_edit_question->setUrl($this->getEditQuestionCmd());
56  $button_edit_question->setPrimary(true);
57  $button_edit_question->setCaption('edit_question');
58  $this->addButtonInstance($button_edit_question);
59  }
60  // Edit Page
61  if ($this->getEditPageCmd() !== null) {
62  $button_edit_page = ilLinkButton::getInstance();
63  $button_edit_page->setUrl($this->getEditPageCmd());
64  $button_edit_page->setCaption('edit_page');
65  $this->addButtonInstance($button_edit_page);
66  }
67 
68  // Reset Preview
69  $this->addFormButton($this->lng->txt('qpl_reset_preview'), $this->getResetPreviewCmd(), '', false);
70  }
71 
73  {
74  $this->resetPreviewCmd = $resetPreviewCmd;
75  }
76 
77  public function getResetPreviewCmd()
78  {
80  }
81 
85  public function getEditQuestionCmd()
86  {
88  }
89 
93  public function setEditQuestionCmd($editQuestionCmd) : void
94  {
95  $this->editQuestionCmd = $editQuestionCmd;
96  }
97 
101  public function getEditPageCmd()
102  {
103  return $this->editPageCmd;
104  }
105 
109  public function setEditPageCmd($editPageCmd) : void
110  {
111  $this->editPageCmd = $editPageCmd;
112  }
113 }
addButtonInstance(ilButtonBase $a_button)
Add button instance.
addFormButton($a_txt, $a_cmd, $a_acc_key="", $a_primary=false, $a_class=false)
Add form button to toolbar.
__construct(Container $dic, ilPlugin $plugin)