clue/graph-uml — pull request #13 by clemens-tolboom (2013-12-29 09:55:37+00:00)
Title: Add static options_data describing the options for a UI.

I need the options avalable through a UI (Drupal).

With the patch done below I get them like done in the (show off image :p)

![add-documented-options-2](https://f.cloud.github.com/assets/371014/1819191/33caff7e-706f-11e3-8358-6b6b29097710.png)

- [ ] Are the descriptions good enough?
- [ ] Do we need more meta data regarding the options?

Within Drupal I run something like the code below to build the needed UI

```php
function getMetas() {
$meta = ClassDiagramBuilder::$options_data;;

$meta['generate-script'] = array(
'description' => 'Adds the script for the Class Diagram',
'default' => FALSE,
);
$meta['generate-image'] = array(
'description' => 'Adds the image for the Class Diagram',
'default' => TRUE,
);

foreach ($meta as $key => &$data) {
if (is_bool($data['default'])) {
if ($data['default']) {
$data['example'] = "$key:0 or 1 (default)";
}
else {
$data['example'] = "$key:1 or 0 (default)";
}
}
else {
$data['example'] = "$key:" . $data['default'];
}
}
return $meta;
}