Code

Added dummy listing of properties
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 09:57:57 +0000 (09:57 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 4 May 2010 09:57:57 +0000 (09:57 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18033 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_configRegistry.inc
gosa-core/plugins/addons/configViewer/class_configViewer.inc

index efc85f942dccd14bd3119b7599817462dff74f72..1b9cacde23e74fe6491f13dbd8122f78f09c2a7b 100644 (file)
@@ -111,6 +111,11 @@ class configRegistry{
         $this->mapPropertyToClass[$id] = $class;
     }
 
+    public function getAllProperties()
+    {
+        return($this->properties);
+    }
+
     function propertyExists($class,$name)
     {
         return(isset($this->mapByName[$class][$name]));
@@ -208,6 +213,7 @@ class gosaProperty
 
     function getValue() { return($this->value); }
     function getName() { return($this->name); }
+    function getClass() { return($this->class); }
     function getType() { return($this->type); }
     function getDescription() { return($this->description); }
     function getDefault() { return($this->default); }
index 4b9543b58efddfd5eae2e0843257a33b18680b31..b8d9f1042b06f7100d4ce6f74540aa859e17afe0 100644 (file)
@@ -5,14 +5,30 @@ class configViewer extends plugin
     var $plHeadline= "Config viewer";
     var $plDescription= "Allows to modify configuration values";
 
+    var $configRegistry = NULL;    
+
     function __construct (&$config, $dn= NULL)
     {
-
+       $this->config = &$config;
+       $this->configRegistry = &$config->configRegistry;
     }
 
     function execute()
     {
-        return('Ja');
+        $all = $this->configRegistry->getAllProperties();
+        $str = "";
+        foreach($all as $p){
+            $str.="
+                <tr>        
+                    <td>{$p->getClass()}</td>
+                    <td>{$p->getName()}</td>
+                    <td>{$p->getDescription()}</td>
+                    <td><input type='text' value='{$p->getValue()}'></td>
+                    <td>{$p->getStatus()}</td>
+                </tr>";
+        }
+
+        return("<table cellspacing=0 cellpadding=0>{$str}</table>");
     }
 }
 ?>