GUI class for glossary flashcards.
More...
◆ __construct()
| ilGlossaryFlashcardGUI::__construct |
( |
| ) |
|
Definition at line 41 of file class.ilGlossaryFlashcardGUI.php.
References $DIC, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
45 $this->
ctrl = $DIC->ctrl();
46 $this->
lng = $DIC->language();
47 $this->tpl = $DIC->ui()->mainTemplate();
48 $this->tabs_gui = $DIC->tabs();
49 $this->ui_fac = $DIC->ui()->factory();
50 $this->ui_ren = $DIC->ui()->renderer();
52 $this->request = $DIC->glossary()
57 $gs = $DIC->glossary()->internal();
58 $this->manager = $gs->domain()->flashcard($this->request->getRefId());
◆ cancelResetBoxes()
| ilGlossaryFlashcardGUI::cancelResetBoxes |
( |
| ) |
|
◆ confirmResetBoxes()
| ilGlossaryFlashcardGUI::confirmResetBoxes |
( |
| ) |
|
Definition at line 141 of file class.ilGlossaryFlashcardGUI.php.
References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
143 $yes_button = $this->ui_fac->button()->standard(
144 $this->
lng->txt(
"yes"),
145 $this->
ctrl->getLinkTarget($this,
"resetBoxes")
147 $no_button = $this->ui_fac->button()->standard(
148 $this->
lng->txt(
"no"),
149 $this->
ctrl->getLinkTarget($this,
"cancelResetBoxes")
151 $cbox = $this->ui_fac->messageBox()->confirmation($this->
lng->txt(
"glo_boxes_really_reset"))
152 ->withButtons([$yes_button, $no_button]);
153 $this->tpl->setContent($this->ui_ren->render($cbox));
◆ executeCommand()
| ilGlossaryFlashcardGUI::executeCommand |
( |
| ) |
|
Definition at line 61 of file class.ilGlossaryFlashcardGUI.php.
References ILIAS\Repository\ctrl().
63 $next_class = $this->
ctrl->getNextClass($this);
64 $cmd = $this->
ctrl->getCmd();
66 switch ($next_class) {
67 case "ilglossaryflashcardboxgui":
69 $this->
ctrl->forwardCommand($flash_boxes);
73 $cmd = $this->
ctrl->getCmd(
"listBoxes");
GUI class for glossary flashcard boxes.
◆ getItemBox()
| ilGlossaryFlashcardGUI::getItemBox |
( |
int |
$nr | ) |
|
|
protected |
Definition at line 110 of file class.ilGlossaryFlashcardGUI.php.
References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().
Referenced by listBoxes().
112 $item_cnt = $this->manager->getItemsForBoxCount($nr);
113 $last_access = $this->manager->getLastAccessForBoxAsDaysText($nr);
115 if (($this->manager->getUserTermIdsForBox($nr) && $nr !== Flashcard\FlashcardBox::LAST_BOX)
116 || ($this->manager->getAllTermsWithoutEntry() && $nr === Flashcard\FlashcardBox::FIRST_BOX)) {
117 $this->
ctrl->setParameterByClass(
"ilglossaryflashcardboxgui",
"box_id", $nr);
118 $title = $this->ui_fac->link()->standard(
119 $this->
lng->txt(
"glo_box") .
" " . $nr,
120 $this->
ctrl->getLinkTargetByClass(
'ilglossaryflashcardboxgui',
'show')
123 $title = $this->
lng->txt(
"glo_box") .
" " . $nr;
126 $box = $this->ui_fac->item()->standard($title);
127 if ($nr === Flashcard\FlashcardBox::LAST_BOX) {
128 $box = $box->withProperties([
129 $this->
lng->txt(
"glo_flashcards") => (string) $item_cnt
132 $box = $box->withProperties([
133 $this->
lng->txt(
"glo_flashcards") => (string) $item_cnt,
134 $this->
lng->txt(
"glo_box_last_presented") => $last_access
Common interface to all items.
◆ listBoxes()
| ilGlossaryFlashcardGUI::listBoxes |
( |
| ) |
|
Definition at line 79 of file class.ilGlossaryFlashcardGUI.php.
References Vendor\Package\$b, ILIAS\Repository\ctrl(), getItemBox(), and ILIAS\Repository\lng().
81 $flashcard_tpl =
new ilTemplate(
"tpl.flashcard_overview.html",
true,
true,
"Modules/Glossary");
83 $reset_btn = $this->ui_fac->button()->standard(
84 $this->
lng->txt(
"glo_reset_all_boxes"),
85 $this->
ctrl->getLinkTarget($this,
"confirmResetBoxes")
87 $flashcard_tpl->setVariable(
"RESET_BUTTON", $this->ui_ren->render($reset_btn));
89 $intro_box = $this->ui_fac->panel()->standard(
90 $this->
lng->txt(
"glo_introduction"),
91 $this->ui_fac->legacy($this->
lng->txt(
"glo_flashcards_intro"))
93 $flashcard_tpl->setVariable(
"INTRO_BOX", $this->ui_ren->render($intro_box));
96 for (
$b = 1;
$b <= 5;
$b++) {
101 $boxes_pnl = $this->ui_fac->panel()->listing()->standard(
102 $this->
lng->txt(
"glo_boxes"),
103 [$this->ui_fac->item()->group(
"", $boxes)]
105 $flashcard_tpl->setVariable(
"BOXES", $this->ui_ren->render($boxes_pnl));
107 $this->tpl->setContent($flashcard_tpl->get());
◆ resetBoxes()
| ilGlossaryFlashcardGUI::resetBoxes |
( |
| ) |
|
◆ $ctrl
| ilCtrl ilGlossaryFlashcardGUI::$ctrl |
|
protected |
◆ $lng
◆ $manager
◆ $request
◆ $tabs_gui
◆ $tpl
◆ $ui_fac
| UI Factory ilGlossaryFlashcardGUI::$ui_fac |
|
protected |
◆ $ui_ren
| UI Renderer ilGlossaryFlashcardGUI::$ui_ren |
|
protected |
The documentation for this class was generated from the following file: