ILIAS  release_8 Revision v8.24
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
 

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 31 of file class.ilAssQuestionPreviewToolbarGUI.php.

32 {
33 $this->lng = $lng;
34
36 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ilToolbarGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ build()

ilAssQuestionPreviewToolbarGUI::build ( )

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

38 : 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 }
addButtonInstance(ilButtonBase $a_button)
Add button instance.

References ilToolbarGUI\addButtonInstance(), getEditPageCmd(), getEditQuestionCmd(), ilLinkButton\getInstance(), ilSubmitButton\getInstance(), and getResetPreviewCmd().

+ Here is the call graph for this function:

◆ getEditPageCmd()

ilAssQuestionPreviewToolbarGUI::getEditPageCmd ( )
Returns
mixed

Definition at line 95 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 79 of file class.ilAssQuestionPreviewToolbarGUI.php.

References $editQuestionCmd.

Referenced by build().

+ Here is the caller graph for this function:

◆ getResetPreviewCmd()

ilAssQuestionPreviewToolbarGUI::getResetPreviewCmd ( )

Definition at line 71 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 103 of file class.ilAssQuestionPreviewToolbarGUI.php.

103 : void
104 {
105 $this->editPageCmd = $editPageCmd;
106 }

References $editPageCmd.

◆ setEditQuestionCmd()

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

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

87 : void
88 {
89 $this->editQuestionCmd = $editQuestionCmd;
90 }

References $editQuestionCmd.

◆ setResetPreviewCmd()

ilAssQuestionPreviewToolbarGUI::setResetPreviewCmd (   $resetPreviewCmd)

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

66 : void
67 {
68 $this->resetPreviewCmd = $resetPreviewCmd;
69 }

References $resetPreviewCmd.

Field Documentation

◆ $editPageCmd

ilAssQuestionPreviewToolbarGUI::$editPageCmd
private

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

Referenced by getEditPageCmd(), and setEditPageCmd().

◆ $editQuestionCmd

ilAssQuestionPreviewToolbarGUI::$editQuestionCmd
private

◆ $resetPreviewCmd

ilAssQuestionPreviewToolbarGUI::$resetPreviewCmd
private

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