ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilTestPlayerConfirmationModal Class Reference
+ Collaboration diagram for ilTestPlayerConfirmationModal:

Public Member Functions

 getModalId ()
 
 setModalId ($modalId)
 
 getHeaderText ()
 
 setHeaderText ($headerText)
 
 getConfirmationText ()
 
 setConfirmationText ($confirmationText)
 
 getConfirmationCheckboxName ()
 
 setConfirmationCheckboxName ($confirmationCheckboxName)
 
 getConfirmationCheckboxLabel ()
 
 setConfirmationCheckboxLabel ($confirmationCheckboxLabel)
 
 getButtons ()
 
 addButton (ilLinkButton $button)
 
 getParameters ()
 
 addParameter (ilHiddenInputGUI $hiddenInputGUI)
 
 isConfirmationCheckboxRequired ()
 
 buildBody ()
 
 getHTML ()
 
 buildModalButtonInstance ($buttonId)
 

Protected Attributes

 $modalId = ''
 
 $headerText = ''
 
 $confirmationText = ''
 
 $confirmationCheckboxName = ''
 
 $confirmationCheckboxLabel = ''
 
 $buttons = array()
 
 $parameters = array()
 

Detailed Description

Definition at line 27 of file class.ilTestPlayerConfirmationModal.php.

Member Function Documentation

◆ addButton()

ilTestPlayerConfirmationModal::addButton ( ilLinkButton  $button)
Parameters
ilLinkButton$button

Definition at line 155 of file class.ilTestPlayerConfirmationModal.php.

156  {
157  $this->buttons[] = $button;
158  }

◆ addParameter()

ilTestPlayerConfirmationModal::addParameter ( ilHiddenInputGUI  $hiddenInputGUI)
Parameters
ilHiddenInputGUI$hiddenInputGUI

Definition at line 171 of file class.ilTestPlayerConfirmationModal.php.

172  {
173  $this->parameters[] = $hiddenInputGUI;
174  }

◆ buildBody()

ilTestPlayerConfirmationModal::buildBody ( )
Returns
string

Definition at line 187 of file class.ilTestPlayerConfirmationModal.php.

References $tpl, getButtons(), getConfirmationCheckboxLabel(), getConfirmationCheckboxName(), getConfirmationText(), getParameters(), and isConfirmationCheckboxRequired().

Referenced by getHTML().

187  : string
188  {
189  $tpl = new ilTemplate('tpl.tst_player_confirmation_modal.html', true, true, 'Modules/Test');
190 
191  if ($this->isConfirmationCheckboxRequired()) {
192  $tpl->setCurrentBlock('checkbox');
193  $tpl->setVariable('CONFIRMATION_CHECKBOX_NAME', $this->getConfirmationCheckboxName());
194  $tpl->setVariable('CONFIRMATION_CHECKBOX_LABEL', $this->getConfirmationCheckboxLabel());
195  $tpl->parseCurrentBlock();
196  }
197 
198  foreach ($this->getParameters() as $parameter) {
199  $tpl->setCurrentBlock('hidden_inputs');
200  $tpl->setVariable('HIDDEN_INPUT', $parameter->getToolbarHTML());
201  $tpl->parseCurrentBlock();
202  }
203 
204  foreach ($this->getButtons() as $button) {
205  $tpl->setCurrentBlock('buttons');
206  $tpl->setVariable('BUTTON', $button->render());
207  $tpl->parseCurrentBlock();
208  }
209 
210  $tpl->setVariable('CONFIRMATION_TEXT', $this->getConfirmationText());
211 
212  return $tpl->get();
213  }
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ buildModalButtonInstance()

ilTestPlayerConfirmationModal::buildModalButtonInstance (   $buttonId)
Parameters
string$buttonId
Returns
ilLinkButton

Definition at line 231 of file class.ilTestPlayerConfirmationModal.php.

References ilLinkButton\getInstance().

231  : ilLinkButton
232  {
233  $button = ilLinkButton::getInstance();
234 
235  $button->setUrl('#');
236  $button->setId($buttonId);
237 
238  return $button;
239  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

◆ getButtons()

ilTestPlayerConfirmationModal::getButtons ( )
Returns
ilLinkButton[]

Definition at line 147 of file class.ilTestPlayerConfirmationModal.php.

References $buttons.

Referenced by buildBody().

147  : array
148  {
149  return $this->buttons;
150  }
+ Here is the caller graph for this function:

◆ getConfirmationCheckboxLabel()

ilTestPlayerConfirmationModal::getConfirmationCheckboxLabel ( )
Returns
string

Definition at line 131 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationCheckboxLabel.

Referenced by buildBody(), and isConfirmationCheckboxRequired().

+ Here is the caller graph for this function:

◆ getConfirmationCheckboxName()

ilTestPlayerConfirmationModal::getConfirmationCheckboxName ( )
Returns
string

Definition at line 115 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationCheckboxName.

Referenced by buildBody(), and isConfirmationCheckboxRequired().

+ Here is the caller graph for this function:

◆ getConfirmationText()

ilTestPlayerConfirmationModal::getConfirmationText ( )
Returns
string

Definition at line 99 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationText.

Referenced by buildBody().

99  : string
100  {
102  }
+ Here is the caller graph for this function:

◆ getHeaderText()

ilTestPlayerConfirmationModal::getHeaderText ( )
Returns
string

Definition at line 83 of file class.ilTestPlayerConfirmationModal.php.

References $headerText.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getHTML()

ilTestPlayerConfirmationModal::getHTML ( )
Returns
string

Definition at line 218 of file class.ilTestPlayerConfirmationModal.php.

References buildBody(), getHeaderText(), ilModalGUI\getInstance(), and getModalId().

218  : string
219  {
220  $modal = ilModalGUI::getInstance();
221  $modal->setId($this->getModalId());
222  $modal->setHeading($this->getHeaderText());
223  $modal->setBody($this->buildBody());
224  return $modal->getHTML();
225  }
static getInstance()
+ Here is the call graph for this function:

◆ getModalId()

ilTestPlayerConfirmationModal::getModalId ( )
Returns
string

Definition at line 67 of file class.ilTestPlayerConfirmationModal.php.

References $modalId.

Referenced by getHTML().

67  : string
68  {
69  return $this->modalId;
70  }
+ Here is the caller graph for this function:

◆ getParameters()

ilTestPlayerConfirmationModal::getParameters ( )
Returns
ilHiddenInputGUI[]

Definition at line 163 of file class.ilTestPlayerConfirmationModal.php.

References $parameters.

Referenced by buildBody().

163  : array
164  {
165  return $this->parameters;
166  }
+ Here is the caller graph for this function:

◆ isConfirmationCheckboxRequired()

ilTestPlayerConfirmationModal::isConfirmationCheckboxRequired ( )
Returns
bool

Definition at line 179 of file class.ilTestPlayerConfirmationModal.php.

References getConfirmationCheckboxLabel(), and getConfirmationCheckboxName().

Referenced by buildBody().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setConfirmationCheckboxLabel()

ilTestPlayerConfirmationModal::setConfirmationCheckboxLabel (   $confirmationCheckboxLabel)
Parameters
string$confirmationCheckboxLabel

Definition at line 139 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationCheckboxLabel.

140  {
141  $this->confirmationCheckboxLabel = $confirmationCheckboxLabel;
142  }

◆ setConfirmationCheckboxName()

ilTestPlayerConfirmationModal::setConfirmationCheckboxName (   $confirmationCheckboxName)
Parameters
string$confirmationCheckboxName

Definition at line 123 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationCheckboxName.

124  {
125  $this->confirmationCheckboxName = $confirmationCheckboxName;
126  }

◆ setConfirmationText()

ilTestPlayerConfirmationModal::setConfirmationText (   $confirmationText)
Parameters
string$confirmationText

Definition at line 107 of file class.ilTestPlayerConfirmationModal.php.

References $confirmationText.

108  {
109  $this->confirmationText = $confirmationText;
110  }

◆ setHeaderText()

ilTestPlayerConfirmationModal::setHeaderText (   $headerText)
Parameters
string$headerText

Definition at line 91 of file class.ilTestPlayerConfirmationModal.php.

References $headerText.

92  {
93  $this->headerText = $headerText;
94  }

◆ setModalId()

ilTestPlayerConfirmationModal::setModalId (   $modalId)
Parameters
string$modalId

Definition at line 75 of file class.ilTestPlayerConfirmationModal.php.

References $modalId.

76  {
77  $this->modalId = $modalId;
78  }

Field Documentation

◆ $buttons

ilTestPlayerConfirmationModal::$buttons = array()
protected

Definition at line 57 of file class.ilTestPlayerConfirmationModal.php.

Referenced by getButtons().

◆ $confirmationCheckboxLabel

ilTestPlayerConfirmationModal::$confirmationCheckboxLabel = ''
protected

◆ $confirmationCheckboxName

ilTestPlayerConfirmationModal::$confirmationCheckboxName = ''
protected

◆ $confirmationText

ilTestPlayerConfirmationModal::$confirmationText = ''
protected

◆ $headerText

ilTestPlayerConfirmationModal::$headerText = ''
protected

Definition at line 37 of file class.ilTestPlayerConfirmationModal.php.

Referenced by getHeaderText(), and setHeaderText().

◆ $modalId

ilTestPlayerConfirmationModal::$modalId = ''
protected

Definition at line 32 of file class.ilTestPlayerConfirmationModal.php.

Referenced by getModalId(), and setModalId().

◆ $parameters

ilTestPlayerConfirmationModal::$parameters = array()
protected

Definition at line 62 of file class.ilTestPlayerConfirmationModal.php.

Referenced by getParameters().


The documentation for this class was generated from the following file: