echo "missing Category for {$this->name}::{$op->name}\n";
} else {
$cats[$op->description->category] = isset($cats[$op->description->category]) ? $cats[$op->description->category] : array();
- $cats[$op->description->category][] = $op->name;
+ $cats[$op->description->category][] = $op;
}
$ret[str_replace('_','-',strtolower($this->name)). '/'.$op->name] = $op->toJS();
}
function catsToJs($ar)
{
-
-
+ sort($ar);
+ $ret = array(
+ '|xns' => 'Roo.bootstrap',
+ 'xtype' => 'NavGroup',
+ 'items' => array(
+
+ )
+ );
+ foreach($ar as $op) {
+ $c = $cname = $op->name;
+ if ($c == '__construct') {
+ print_R($op);exit;
+ $cname = 'new ' . $op->{'class'};
+ }
+ $ret['items'][] = array(
+ '|xns' => 'Roo.bootstrap',
+ 'xtype' => 'NavItem',
+ 'href' => '#' . str_replace('_','-',strtolower($this->name)). '/'.$c,
+ 'html' => $cname
+ );
+ }
+ return $ret;
}