public function getSidebar() { $output = ""; // TODO some go to tag link // TODO navigate this page too $output .= "<h2>Navigating statistics</h2>"; $siblingTags = getSiblingTags($this->tag["position"]); if (!empty($siblingTags)) { $output .= "<p class='navigation'>"; if (isset($siblingTags["previous"])) { $output .= "<span class='left'><a title='" . $siblingTags["previous"]["tag"] . " " . $siblingTags["previous"]["label"] . "' href='" . href("tag/" . $siblingTags["previous"]["tag"]) . "/statistics'><< Previous tag</a></span>"; } if (isset($siblingTags["next"])) { $output .= "<span class='right'><a title='" . $siblingTags["next"]["tag"] . " " . $siblingTags["next"]["label"] . "' href='" . href("tag/" . $siblingTags["next"]["tag"]) . "/statistics'>Next tag >></a></span>"; } $output .= "</p>"; } $output .= "<h2>Dependency graphs</h2>"; $output .= "<p style='margin-left: 1em'>" . printGraphLink($this->tag["tag"], "cluster", "cluster") . "<br>"; $output .= printGraphLink($this->tag["tag"], "force", "force-directed") . "<br>"; $output .= printGraphLink($this->tag["tag"], "collapsible", "collapsible") . "<br>"; return $output; }
private function getSiblingTags() { // check whether result is already cached if ($this->siblingTags == null) { $this->siblingTags = getSiblingTags($this->tag["position"]); } return $this->siblingTags; }