public function permissionTree()
  {
    $permtree = array();

    foreach($this->permissionCats() as $key => $val)
    {
      $permtree[$val]["permcatid"]      = $val;
      $permtree[$val]["permcathex"]     = "0x" . dechex($val);
      $permtree[$val]["permcatname"]    = TeamSpeak3_Helper_String::factory(TeamSpeak3_Helper_Convert::permissionCategory($val));
      $permtree[$val]["permcatparent"]  = $permtree[$val]["permcathex"]{3} == 0 ? 0 : hexdec($permtree[$val]["permcathex"]{2} . 0);
      $permtree[$val]["permcatchilren"] = 0;
      $permtree[$val]["permcatcount"]   = 0;

      if(isset($permtree[$permtree[$val]["permcatparent"]]))
      {
        $permtree[$permtree[$val]["permcatparent"]]["permcatchilren"]++;
      }

      if($permtree[$val]["permcatname"]->contains("/"))
      {
        $permtree[$val]["permcatname"] = $permtree[$val]["permcatname"]->section("/", 1)->trim();
      }

      foreach($this->permissionList() as $permission)
      {
        if($permission["permid"]["permcatid"] == $val)
        {
          $permtree[$val]["permcatcount"]++;
        }
      }
    }

    return $permtree;
  }
public function permissionTree()
  {
    $permtree = array();

    foreach($this->permissionCats() as $key => $val)
    {
      $permtree[$val]["permcatid"]      = $val;
      $permtree[$val]["permcathex"]     = "0x" . dechex($val);
      $permtree[$val]["permcatname"]    = TeamSpeak3_Helper_String::factory(TeamSpeak3_Helper_Convert::permissionCategory($val));
      $permtree[$val]["permcatparent"]  = $permtree[$val]["permcathex"]{3} == 0 ? 0 : hexdec($permtree[$val]["permcathex"]{2} . 0);
      $permtree[$val]["permcatchilren"] = 0;
      $permtree[$val]["permcatcount"]   = 0;

      if(isset($permtree[$permtree[$val]["permcatparent"]]))
      {
        $permtree[$permtree[$val]["permcatparent"]]["permcatchilren"]++;
      }

      if($permtree[$val]["permcatname"]->contains("/"))
      {
        $permtree[$val]["permcatname"] = $permtree[$val]["permcatname"]->section("/", 1)->trim();
      }

      foreach($this->permissionList() as $permission)
      {
        if($permission["permid"]["permcatid"] == $val)
        {
          $permtree[$val]["permcatcount"]++;
        }
      }
    }

    return $permtree;
  }
public function permissionTree ( ) { $ permtree = array ( ) ; foreach ( $ this -> permissionCats ( ) as $ key => $ val ) { $ permtree [ $ val ] [ "permcatid" ] = $ val ; $ permtree [ $ val ] [ "permcathex" ] = "0x" . dechex ( $ val ) ; $ permtree [ $ val ] [ "permcatname" ] = TeamSpeak3_Helper_String :: factory ( TeamSpeak3_Helper_Convert :: permissionCategory ( $ val ) ) ; $ permtree [ $ val ] [ "permcatparent" ] = $ permtree [ $ val ] [ "permcathex" ] { 3 } == 0 ? 0 : hexdec ( $ permtree [ $ val ] [ "permcathex" ] { 2 } . 0 ) ; $ permtree [ $ val ] [ "permcatchilren" ] = 0 ; $ permtree [ $ val ] [ "permcatcount" ] = 0 ; if ( isset ( $ permtree [ $ permtree [ $ val ] [ "permcatparent" ] ] ) ) { $ permtree [ $ permtree [ $ val ] [ "permcatparent" ] ] [ "permcatchilren" ] ++ ; } if ( $ permtree [ $ val ] [ "permcatname" ] -> contains ( "/" ) ) { $ permtree [ $ val ] [ "permcatname" ] = $ permtree [ $ val ] [ "permcatname" ] -> section ( "/" , 1 ) -> trim ( ) ; } foreach ( $ this -> permissionList ( ) as $ permission ) { if ( $ permission [ "permid" ] [ "permcatid" ] == $ val ) { $ permtree [ $ val ] [ "permcatcount" ] ++ ; } } } return $ permtree ; }
Returns an array filled with all permission categories known to the server including
their ID, name and parent.

@return array
Returns an array filled with all permission categories known to the server including their ID name and parent .