{
$ret = array();
$cats = array();
+ $cls = str_replace('_','-',strtolower($this->name));
foreach($this->Operations as $op) {
if (!isset($op->description->category)) {
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();
+ $n = $cls . '/'. ($op->name == '__construct' ? 'new' : $op->name;;
+ $ret[$n] = $op->toJS();
}
foreach($this->Attributes as $op) {
// $ret[$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') {
+ $cname = 'new ' . $op->{'class'};
+ $c = 'new';
+ }
+ $ret['items'][] = array(
+ '|xns' => 'Roo.bootstrap',
+ 'xtype' => 'NavItem',
+ 'href' => '#' . str_replace('_','-',strtolower($this->name)). '/'.$c,
+ 'html' => $cname
+ );
+ }
+ return $ret;
}