Beispiel #1
0
 public function loadDefault($ignoreSession = false, $tag = null)
 {
     if (!$ignoreSession && isset($_SESSION["toLearn"]) && count($_SESSION["toLearn"]) > 0) {
         $this->redirect(null, "continueQuestion", array("tag" => $tag));
         return;
     }
     $tm = new \Manager\TagsManager();
     $tags = $tm->getTagsByUser($this->getUserManager()->getLoggedInUser());
     $this->assignToView("tags", $tags);
     $this->assignToView("tag", $tag);
 }
Beispiel #2
0
 public function loadEdit($cardId)
 {
     $card = $this->findCardOrError($cardId);
     $this->assignToView("card", $card);
     $stringTags = "";
     foreach ($card->getTags() as $t) {
         $stringTags .= ($stringTags == "" ? "" : ", ") . $t->getName();
     }
     $this->assignToView("stringTags", $stringTags);
     $tm = new \Manager\TagsManager();
     $this->assignToView("tags", $tm->getTagsByUser());
 }