Code

Udpated setup
[gosa.git] / setup / class_setupStep.inc
1 <?php
3 /*
4    This code is part of GOsa (https://gosa.gonicus.de)
5    Copyright (C) 2007 Fabian Hickert
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20 */
23 class setup_step extends plugin
24 {
25   var $s_title      = "Still undefined";
26   var $s_title_long = "This is a still undefined long title";
27   var $s_info       = "This info is still undefined. This setup step detect the type of your ldap. This is a basic requirement for gosa.";
28   var $is_active    = false;
29   var $is_enabled   = false;
30   var $is_completed = false;
32   var $attributes   = array();
34   function save_object()
35   {
36     /* Do not call plugin::save_object. This causes acl trouble  */
37   }
39   function get_title()
40   { 
41     return($this->s_title);
42   }
44   function get_long_title()
45   { 
46     return($this->s_title_long);
47   }
49   function get_small_info()
50   { 
51     return($this->s_info);
52   }
53   
54   function is_active()
55   {
56     return($this->is_active);
57   }
59   function is_enabled()
60   {
61     return($this->is_enabled);
62   }
64   function is_completed()
65   {
66     return($this->is_completed);
67   }
69   function set_active($value = TRUE)
70   {
71     if($value){ 
72       $this->is_active = TRUE;  
73     }else{
74       $this->is_active = FALSE;  
75     }
76   }
78   function set_enabled($value = TRUE)
79   {
80     if($value){ 
81       $this->is_enabled = TRUE;  
82     }else{
83       $this->is_enabled = FALSE;  
84     }
85   }
87   function set_completed($value = TRUE)
88   {
89     if($value){ 
90       $this->is_completed = TRUE;  
91     }else{
92       $this->is_completed = FALSE;  
93     }
94   }
96   /* Return attributes handled by this setup step */
97   function get_attributes()
98   {
99     $tmp = array();
100     foreach($this->attributes as $attr){
101       $tmp[$attr] = $this->$attr;
102     }
103     return($tmp);
104   }
109 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
110 ?>