diff options
| author | Simon | 2011-03-30 16:45:03 +0200 |
|---|---|---|
| committer | Simon | 2011-03-30 16:45:03 +0200 |
| commit | 08211d1d1f79ccc79b81d1888a64282f5476dc3c (patch) | |
| tree | 423fe374630a702d18a6bed2508431718333edd7 /library/Pbs/Graph.php | |
| parent | 'angemeldet als' hinzugefügt (diff) | |
| download | pbs2-08211d1d1f79ccc79b81d1888a64282f5476dc3c.tar.gz pbs2-08211d1d1f79ccc79b81d1888a64282f5476dc3c.tar.xz pbs2-08211d1d1f79ccc79b81d1888a64282f5476dc3c.zip | |
level für graph hinzugefügt
Diffstat (limited to 'library/Pbs/Graph.php')
| -rw-r--r-- | library/Pbs/Graph.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/library/Pbs/Graph.php b/library/Pbs/Graph.php index df36ac4..c3f7139 100644 --- a/library/Pbs/Graph.php +++ b/library/Pbs/Graph.php @@ -5,12 +5,12 @@ class Pbs_Graph{ private $db = null; private $membership; private $graphstring; + private $level; public function graph($groupID) { $this->db = Zend_Db_Table::getDefaultAdapter(); - $db = $this->db; - + $db = $this->db; $this->graphstring = 'digraph groups { @@ -46,7 +46,7 @@ class Pbs_Graph{ foreach($result as $row){ // save the current groupID in level-list #$data[$level][] = $row['parentID']; - $this->graphstring .= '"'.$this->getGroupTitle($row['parentID']).'" -> "'.$this->getGroupTitle($groupID).'";'."\n"; + $this->graphstring .= '"'.$this->getGroupTitle($row['parentID']).'" -> "'.$this->getGroupTitle($groupID).'";'."\n"; // get the function recursive an increase the level $this->getParentGroups($row['parentID'], $level+1); } @@ -62,8 +62,14 @@ class Pbs_Graph{ // save the current groupID in level-list #$data[$level][] = $row['groupID']; $this->graphstring .= '"'.$this->getGroupTitle($groupID).'" -> "'.$this->getGroupTitle($row['groupID']).'";'."\n"; + if($this->level >= $level){ + $this->graphstring .= '"'.$this->getGroupTitle($row['groupID']).'"'.' [ fontcolor="#ffffffff", style=filled, fillcolor="#004A99FF"];'."\n"; + } // get the function recursive an increase the level $this->getChildGroups($row['groupID'], $level+1); } } + public function setHiglightLevel($i){ + $this->level = $i; + } } |
