Example #1
0
 public function loadShow($mindMapId)
 {
     $currentMindMap = $this->mnm->findById($mindMapId);
     $this->assignToView("mindmap", $currentMindMap);
     $tags = $this->tm->getTagsByUser();
     $this->assignToView("tags", $tags);
     if (count($tags) > 0) {
         //display only cards of the first tag
         $this->assignToView("cards", $this->cm->findCards(null, array($tags[0]->getId())));
     } else {
         $this->assignToView("cards", $this->cm->getCardsByUser());
     }
     $links = $this->lm->findByMindMap($currentMindMap);
     $this->assignToView("links", $links);
     $linksMap = array();
     foreach ($links as $l) {
         $linksMap["link" . $l->getId()] = array("id" => $l->getId(), "leftId" => "node" . $l->getLeftNode()->getId(), "rightId" => "node" . $l->getRightNode()->getId(), "state" => "clean", "text" => $l->getText(), "leftArrow" => $l->isLeftArrow(), "rightArrow" => $l->isRightArrow());
     }
     $this->assignToView("linksAsJson", json_encode($linksMap));
 }
Example #2
0
 public function loadTaglist($cardId)
 {
     $this->assignToView("tags", $this->tm->findByCard($cardId));
 }