| @@ 234-251 (lines=18) @@ | ||
| 231 | $this->printNavLinks($navlinks, $this->table_place, get_defined_vars()); |
|
| 232 | } |
|
| 233 | ||
| 234 | public function doTree() |
|
| 235 | { |
|
| 236 | $data = $this->misc->getDatabaseAccessor(); |
|
| 237 | ||
| 238 | $databases = $data->getDatabases(); |
|
| 239 | ||
| 240 | $reqvars = $this->misc->getRequestVars('database'); |
|
| 241 | ||
| 242 | $attrs = [ |
|
| 243 | 'text' => Decorator::field('datname'), |
|
| 244 | 'icon' => 'Database', |
|
| 245 | 'toolTip' => Decorator::field('datcomment'), |
|
| 246 | 'action' => Decorator::redirecturl('redirect', $reqvars, ['subject' => 'database', 'database' => Decorator::field('datname')]), |
|
| 247 | 'branch' => Decorator::url('/src/views/database', $reqvars, ['action' => 'tree', 'database' => Decorator::field('datname')]), |
|
| 248 | ]; |
|
| 249 | ||
| 250 | return $this->printTree($databases, $attrs, 'databases'); |
|
| 251 | } |
|
| 252 | ||
| 253 | /** |
|
| 254 | * Display a form for alter and perform actual alter. |
|
| @@ 194-227 (lines=34) @@ | ||
| 191 | /** |
|
| 192 | * Generate XML for the browser tree. |
|
| 193 | */ |
|
| 194 | public function doTree() |
|
| 195 | { |
|
| 196 | $data = $this->misc->getDatabaseAccessor(); |
|
| 197 | ||
| 198 | $schemas = $data->getSchemas(); |
|
| 199 | ||
| 200 | $reqvars = $this->misc->getRequestVars('schema'); |
|
| 201 | ||
| 202 | //$this->prtrace($reqvars); |
|
| 203 | ||
| 204 | $attrs = [ |
|
| 205 | 'text' => Decorator::field('nspname'), |
|
| 206 | 'icon' => 'Schema', |
|
| 207 | 'toolTip' => Decorator::field('nspcomment'), |
|
| 208 | 'action' => Decorator::redirecturl( |
|
| 209 | 'redirect', |
|
| 210 | $reqvars, |
|
| 211 | [ |
|
| 212 | 'subject' => 'schema', |
|
| 213 | 'schema' => Decorator::field('nspname'), |
|
| 214 | ] |
|
| 215 | ), |
|
| 216 | 'branch' => Decorator::url( |
|
| 217 | 'schemas', |
|
| 218 | $reqvars, |
|
| 219 | [ |
|
| 220 | 'action' => 'subtree', |
|
| 221 | 'schema' => Decorator::field('nspname'), |
|
| 222 | ] |
|
| 223 | ), |
|
| 224 | ]; |
|
| 225 | ||
| 226 | return $this->printTree($schemas, $attrs, 'schemas'); |
|
| 227 | } |
|
| 228 | ||
| 229 | public function doSubTree() |
|
| 230 | { |
|