Code

Added function which connects 'plugin id' with the "plugin value"
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Nov 2005 10:23:43 +0000 (10:23 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 2 Nov 2005 10:23:43 +0000 (10:23 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1788 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_pluglist.inc

index 26b71d707c45ba833fb19bd5f5419eead0bc476c..f9867076ebd6475d2e226a0f82deec2f306a51d6 100644 (file)
@@ -28,6 +28,7 @@ class pluglist {
   var $dirlist= array();
   var $ui= NULL;
   var $current= "";
+  var $headlines = array();
 
   function pluglist($config, $ui)
   {
@@ -79,6 +80,22 @@ class pluglist {
        return (FALSE);
   }
 
+  function gen_headlines()
+  {
+         $ret = array();
+         if(count($this->headlines) == 0){
+                 foreach($this->config->data['MENU'] as $headline => $plugins){
+                         foreach( $plugins as $id => $plug){
+                                 $attrs = (get_class_vars($plug['CLASS']));
+                                 $ret[$id]['HEADLINE'] = $headline;
+                                 $ret[$id]['NAME']       = _($attrs['plHeadline']);    
+                         }
+                 }
+                 $this->headlines = $ret;
+         }
+         return($this->headlines);
+  }
+
   function gen_menu()
   {
        if ($this->menu == ""){