This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
More...
|
| setFormAction (string $a_form_action) |
|
| getFormAction () |
|
| setHeaderText (string $a_headertext) |
|
| getHeaderText () |
|
| setFormName (string $a_name) |
|
| addButton (string $a_txt, string $a_cmd) |
|
| setCancel (string $a_txt, string $a_cmd, string $a_id='') |
|
| setConfirm (string $a_txt, string $a_cmd, string $a_id='') |
|
| addItem (string $a_post_var, string $a_id, string $a_text, string $a_img='', string $a_alt='') |
|
| addHiddenItem (string $a_post_var, string $a_value) |
|
| getHTML () |
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Confirmation screen class.
- Author
- Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Definition at line 24 of file class.ilConfirmationGUI.php.
◆ addButton()
ilConfirmationGUI::addButton |
( |
string |
$a_txt, |
|
|
string |
$a_cmd |
|
) |
| |
|
final |
◆ addHiddenItem()
ilConfirmationGUI::addHiddenItem |
( |
string |
$a_post_var, |
|
|
string |
$a_value |
|
) |
| |
◆ addItem()
ilConfirmationGUI::addItem |
( |
string |
$a_post_var, |
|
|
string |
$a_id, |
|
|
string |
$a_text, |
|
|
string |
$a_img = '' , |
|
|
string |
$a_alt = '' |
|
) |
| |
◆ getFormAction()
ilConfirmationGUI::getFormAction |
( |
| ) |
|
|
final |
◆ getHeaderText()
ilConfirmationGUI::getHeaderText |
( |
| ) |
|
◆ getHTML()
ilConfirmationGUI::getHTML |
( |
| ) |
|
|
final |
Definition at line 137 of file class.ilConfirmationGUI.php.
References Vendor\Package\$b, getFormAction(), getHeaderText(), and ilSubmitButton\getInstance().
139 if ($this->headertext ===
'') {
140 throw new RuntimeException(
'Please provide a header text before rendering the confirmation dialogue');
143 if ($this->form_action ===
'') {
144 throw new RuntimeException(
'Please provide a form action before rendering the confirmation dialogue');
147 if ($this->confirm_txt ===
'' || $this->confirm_cmd ===
'') {
148 throw new RuntimeException(
'Please provide a confirmation button label and command before rendering the confirmation dialogue');
151 if ($this->cancel_txt ===
'' || $this->cancel_cmd ===
'') {
152 throw new RuntimeException(
'Please provide a cancel button label and command before rendering the confirmation dialogue');
155 $this->main_tpl->setOnScreenMessage(
'question', $this->
getHeaderText());
158 if (count($this->item) > 0) {
160 $ctab->setData($this->item);
162 foreach ($this->buttons as
$b) {
163 $ctab->addCommandButton($b[
"cmd"], $b[
"txt"]);
165 $ctab->addCommandButton($this->confirm_cmd, $this->confirm_txt);
166 $ctab->addCommandButton($this->cancel_cmd, $this->cancel_txt);
169 $ctab->addHiddenInput($hidden_item[
"var"], $hidden_item[
"value"]);
172 if ($this->form_name !==
'') {
173 $ctab->setFormName($this->form_name);
176 return $ctab->getHTML();
181 $tb->setPreventDoubleSubmission(
true);
183 if ($this->hidden_item) {
184 foreach ($this->hidden_item as $hidden_item) {
186 $hiddenInput->setValue($hidden_item[
'value']);
187 $tb->addInputItem($hiddenInput);
191 $confirm->setCommand($this->confirm_cmd);
192 $confirm->setCaption($this->confirm_txt,
false);
193 $confirm->setId($this->confirm_id);
196 $cancel->setCommand($this->cancel_cmd);
197 $cancel->setCaption($this->cancel_txt,
false);
199 if ($this->cancel_id !==
'') {
200 $cancel->setId($this->cancel_id);
203 $tb->addStickyItem($confirm);
204 $tb->addStickyItem($cancel);
206 return $tb->getHTML();
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ setCancel()
ilConfirmationGUI::setCancel |
( |
string |
$a_txt, |
|
|
string |
$a_cmd, |
|
|
string |
$a_id = '' |
|
) |
| |
|
final |
◆ setConfirm()
ilConfirmationGUI::setConfirm |
( |
string |
$a_txt, |
|
|
string |
$a_cmd, |
|
|
string |
$a_id = '' |
|
) |
| |
|
final |
◆ setFormAction()
ilConfirmationGUI::setFormAction |
( |
string |
$a_form_action | ) |
|
|
final |
◆ setFormName()
ilConfirmationGUI::setFormName |
( |
string |
$a_name | ) |
|
◆ setHeaderText()
ilConfirmationGUI::setHeaderText |
( |
string |
$a_headertext | ) |
|
◆ $buttons
array ilConfirmationGUI::$buttons = [] |
|
private |
◆ $cancel_cmd
string ilConfirmationGUI::$cancel_cmd = '' |
|
protected |
◆ $cancel_id
string ilConfirmationGUI::$cancel_id = '' |
|
protected |
◆ $cancel_txt
string ilConfirmationGUI::$cancel_txt = '' |
|
protected |
◆ $confirm_cmd
string ilConfirmationGUI::$confirm_cmd = '' |
|
protected |
◆ $confirm_id
string ilConfirmationGUI::$confirm_id = '' |
|
protected |
◆ $confirm_txt
string ilConfirmationGUI::$confirm_txt = '' |
|
protected |
◆ $form_action
string ilConfirmationGUI::$form_action = '' |
|
protected |
◆ $form_name
string ilConfirmationGUI::$form_name = '' |
|
private |
◆ $headertext
string ilConfirmationGUI::$headertext = '' |
|
protected |
◆ $hidden_item
array ilConfirmationGUI::$hidden_item = [] |
|
private |
◆ $item
array ilConfirmationGUI::$item = [] |
|
private |
◆ $lng
◆ $main_tpl
◆ $use_images
bool ilConfirmationGUI::$use_images = false |
|
private |
The documentation for this class was generated from the following file: