ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilAssQuestionPreviewToolbarGUI Class Reference
+ Inheritance diagram for ilAssQuestionPreviewToolbarGUI:
+ Collaboration diagram for ilAssQuestionPreviewToolbarGUI:

Public Member Functions

 __construct (ilLanguage $lng)
 
 build ()
 
 setResetPreviewCmd ($resetPreviewCmd)
 
 getResetPreviewCmd ()
 
 getEditQuestionCmd ()
 
 setEditQuestionCmd ($editQuestionCmd)
 
 getEditPageCmd ()
 
 setEditPageCmd ($editPageCmd)
 
- Public Member Functions inherited from ilToolbarGUI
 setFormAction (string $a_val, bool $a_multipart=false, string $a_target="")
 Set form action (if form action is set, toolbar is wrapped into form tags) More...
 
 getFormAction ()
 
 setLeadingImage (string $a_img, string $a_alt)
 
 setHidden (bool $a_val)
 
 getHidden ()
 
 setId (string $a_val)
 
 getId ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 addButton (string $a_txt, string $a_cmd, string $a_target="", ?int $a_acc_key=null, string $a_additional_attrs='', string $a_id="", string $a_class='submit')
 
 addFormButton (string $a_txt, string $a_cmd, ?int $a_acc_key=null, bool $a_primary=false, ?string $a_class=null)
 
 addInputItem (ilToolbarItem $a_item, bool $a_output_label=false)
 
 addStickyItem ( $a_item, bool $a_output_label=false)
 Add a sticky item. More...
 
 addButtonInstance (ilButtonBase $a_button)
 Add button instance. More...
 
 addDropDown (string $a_txt, string $a_dd_html)
 
 addAdvancedSelectionList (ilAdvancedSelectionListGUI $adv)
 
 addSeparator ()
 
 addText (string $a_text)
 
 addSpacer (string $a_width=null)
 
 addComponent (\ILIAS\UI\Component\Component $a_comp)
 
 addLink (string $a_caption, string $a_url, bool $a_disabled=false)
 
 setOpenFormTag (bool $a_val)
 
 getOpenFormTag ()
 
 setCloseFormTag (bool $a_val)
 
 getCloseFormTag ()
 
 setFormName (string $a_val)
 
 getFormName ()
 
 getGroupedItems ()
 Get all groups (items separated by a separator) More...
 
 getItems ()
 
 setItems (array $items)
 

Private Attributes

 $resetPreviewCmd
 
 $editQuestionCmd
 
 $editPageCmd
 
ilCtrlInterface $ilCtrl
 

Additional Inherited Members

- Data Fields inherited from ilToolbarGUI
array $items = array()
 
- Protected Member Functions inherited from ilToolbarGUI
 applyAutoStickyToSingleElement ()
 If the toolbar consists of only one button, make it sticky Note: Atm this is only possible for buttons. More...
 
- Protected Attributes inherited from ilToolbarGUI
ilLanguage $lng
 
string $id = ''
 
string $form_action = ''
 
bool $hidden = false
 
array $lead_img
 
bool $open_form_tag = true
 
bool $close_form_tag = true
 
string $form_target = ""
 
string $form_name = ""
 
bool $prevent_double_submission = false
 
array $sticky_items = array()
 
bool $has_separator = false
 
ILIAS DI UIServices $ui
 
bool $multipart = false
 
- Static Protected Attributes inherited from ilToolbarGUI
static int $instances = 0
 

Detailed Description

Definition at line 25 of file class.ilAssQuestionPreviewToolbarGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilAssQuestionPreviewToolbarGUI::__construct ( ilLanguage  $lng)

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

References $DIC, ilToolbarGUI\$lng, ILIAS\MetaData\Repository\Validation\Data\__construct(), and ILIAS\Repository\lng().

33  {
34  $this->lng = $lng;
35  global $DIC;
36  $this->ilCtrl = $DIC->ctrl();
37 
39  }
global $DIC
Definition: feed.php:28
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilAssQuestionPreviewToolbarGUI::build ( )

Definition at line 41 of file class.ilAssQuestionPreviewToolbarGUI.php.

References ilToolbarGUI\addComponent(), getEditPageCmd(), getEditQuestionCmd(), getResetPreviewCmd(), ILIAS\Repository\lng(), and ILIAS\Repository\ui().

41  : void
42  {
43  // Edit Question
44  if ($this->getEditQuestionCmd() !== null) {
45  $button_edit_question = $this->ui->factory()->button()->primary($this->lng->txt('edit_question'), $this->getEditQuestionCmd());
46  $this->addComponent($button_edit_question);
47  }
48 
49  // Edit Page
50  if ($this->getEditPageCmd() !== null) {
51  $button_edit_page = $this->ui->factory()->button()->standard($this->lng->txt('edit_page'), $this->getEditPageCmd());
52  $this->addComponent($button_edit_page);
53  }
54 
55  //Reset Preview
56  $action = $this->ilCtrl->getLinkTargetByClass(ilAssQuestionPreviewGUI::class, $this->getResetPreviewCmd());
57  $button = $this->ui->factory()->button()->standard($this->lng->txt('qpl_reset_preview'), $action);
58  $this->addComponent($button);
59  }
addComponent(\ILIAS\UI\Component\Component $a_comp)
+ Here is the call graph for this function:

◆ getEditPageCmd()

ilAssQuestionPreviewToolbarGUI::getEditPageCmd ( )
Returns
mixed

Definition at line 90 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $editPageCmd.

Referenced by build().

+ Here is the caller graph for this function:

◆ getEditQuestionCmd()

ilAssQuestionPreviewToolbarGUI::getEditQuestionCmd ( )
Returns
mixed

Definition at line 74 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $editQuestionCmd.

Referenced by build().

+ Here is the caller graph for this function:

◆ getResetPreviewCmd()

ilAssQuestionPreviewToolbarGUI::getResetPreviewCmd ( )

Definition at line 66 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $resetPreviewCmd.

Referenced by build().

+ Here is the caller graph for this function:

◆ setEditPageCmd()

ilAssQuestionPreviewToolbarGUI::setEditPageCmd (   $editPageCmd)
Parameters
mixed$editPageCmd

Definition at line 98 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $editPageCmd.

98  : void
99  {
100  $this->editPageCmd = $editPageCmd;
101  }

◆ setEditQuestionCmd()

ilAssQuestionPreviewToolbarGUI::setEditQuestionCmd (   $editQuestionCmd)
Parameters
mixed$editQuestionCmd

Definition at line 82 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $editQuestionCmd.

82  : void
83  {
84  $this->editQuestionCmd = $editQuestionCmd;
85  }

◆ setResetPreviewCmd()

ilAssQuestionPreviewToolbarGUI::setResetPreviewCmd (   $resetPreviewCmd)

Definition at line 61 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $resetPreviewCmd.

61  : void
62  {
63  $this->resetPreviewCmd = $resetPreviewCmd;
64  }

Field Documentation

◆ $editPageCmd

ilAssQuestionPreviewToolbarGUI::$editPageCmd
private

Definition at line 29 of file class.ilAssQuestionPreviewToolbarGUI.php.

Referenced by getEditPageCmd(), and setEditPageCmd().

◆ $editQuestionCmd

ilAssQuestionPreviewToolbarGUI::$editQuestionCmd
private

◆ $ilCtrl

ilCtrlInterface ilAssQuestionPreviewToolbarGUI::$ilCtrl
private

Definition at line 30 of file class.ilAssQuestionPreviewToolbarGUI.php.

◆ $resetPreviewCmd

ilAssQuestionPreviewToolbarGUI::$resetPreviewCmd
private

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