summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorSimon2011-04-14 13:39:56 +0200
committerSimon2011-04-14 13:39:56 +0200
commit4ef5ef67e07245296fe73d3948d9526338bced63 (patch)
tree9317e60083f3279397c9f48aabc421ad65660457 /library
parentEs werden keine Sessions mehr angelegt wenn ein Admin die Bootmenuentries tes... (diff)
downloadpbs2-4ef5ef67e07245296fe73d3948d9526338bced63.tar.gz
pbs2-4ef5ef67e07245296fe73d3948d9526338bced63.tar.xz
pbs2-4ef5ef67e07245296fe73d3948d9526338bced63.zip
Ticket #207 - Graph wird beim verlinken angezeigt
Diffstat (limited to 'library')
-rw-r--r--library/Pbs/Graph.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php
index e42b9d4..664c078 100644
--- a/library/Pbs/Graph.php
+++ b/library/Pbs/Graph.php
@@ -8,6 +8,7 @@ class Pbs_Graph{
private $level;
private $edges;
private $crawledNodes;
+ private $childs = array();
public function graph($groupID)
{
@@ -25,6 +26,13 @@ class Pbs_Graph{
node [ style=filled fillcolor="#ffffffff" ];
"'.$this->getGroupTitle($groupID).'" [ fontcolor="#ffffffff", style=filled, fillcolor="#004A99FF"];
';
+ if(count($this->childs) >=1){
+ foreach($this->childs as $childID){
+ $this->edges[$groupID][$childID] = 1;
+ $this->graphstring .= '"'.$this->getGroupTitle($groupID).'" -> "'.$this->getGroupTitle($childID).'";'."\n";
+ $this->getChildGroups($childID);
+ }
+ }
$this->getParentGroups($groupID);
$this->getChildGroups($groupID);
$this->graphstring .= '}';
@@ -73,6 +81,9 @@ class Pbs_Graph{
$groupmapper->find($groupID,$group);
return $group->getTitle();
}
+ public function newChild($id){
+ $this->childs[] = $id;
+ }
private function getParentGroups($groupID, $level=1) {
if($this->crawledNodes['parent'][$groupID] == 1)