fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [9450]


From: Torstein
Subject: [Fmsystem-commits] [9450]
Date: Tue, 29 May 2012 01:33:40 +0000

Revision: 9450
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9450
Author:   vator
Date:     2012-05-29 01:33:39 +0000 (Tue, 29 May 2012)
Log Message:
-----------


Modified Paths:
--------------
    trunk/controller/inc/model/class.control_item.inc.php

Added Paths:
-----------
    trunk/controller/inc/model/class.control_item_option.inc.php

Modified: trunk/controller/inc/model/class.control_item.inc.php
===================================================================
--- trunk/controller/inc/model/class.control_item.inc.php       2012-05-29 
01:33:09 UTC (rev 9449)
+++ trunk/controller/inc/model/class.control_item.inc.php       2012-05-29 
01:33:39 UTC (rev 9450)
@@ -34,16 +34,8 @@
        {
                public static $so;
                
-               /*
-               const "CONTROL_ITEM_TYPE_MAALING" = "control_item_type_1";
-               const CONTROL_ITEM_TYPE_MAALING = "control_item_type_1";
-               */
+               public $type_array = array("control_item_type_1", 
"control_item_type_2", "control_item_type_3", "control_item_type_4");
                
-               public static $type_array = array("CONTROL_ITEM_TYPE_1" => 
"Vanlig", 
-                                                                               
 "CONTROL_ITEM_TYPE_2" => "MÃ¥ling",
-                                                                               
 "CONTROL_ITEM_TYPE_3" => "Nedtrekksliste",
-                                                                               
 "CONTROL_ITEM_TYPE_4" => "Radioknapper");
-               
                protected $id;
                protected $title;
                protected $required;
@@ -55,6 +47,8 @@
                protected $control_area_name;
                protected $type;
                
+               protected $options_array;
+               
                /**
                 * Constructor.  Takes an optional ID.  If a contract is 
created from outside
                 * the database the ID should be empty so the database can add 
one according to its logic.
@@ -135,6 +129,18 @@
                }
                
                public function get_type() { return $this->type; }
+               
+               public function set_options_array($options_array)
+               {
+                       $this->options_array = $options_array;
+               }
+               
+               public function get_options_array() { return 
$this->options_array; }
+               
+               public function get_control_item_types()
+               {
+                       return array_values( $this->type_array );
+               }
                        
                /**
                 * Get a static reference to the storage object associated with 
this model object
@@ -161,6 +167,7 @@
                        $result['how_to_do'] = $this->get_how_to_do();
                        $result['control_group'] = 
$this->get_control_group_name();
                        $result['control_area'] = 
$this->get_control_area_name();
+                       $result['control_area'] = 
$this->get_control_area_name();
                                                
                        return $result;
                }

Added: trunk/controller/inc/model/class.control_item_option.inc.php
===================================================================
--- trunk/controller/inc/model/class.control_item_option.inc.php                
                (rev 0)
+++ trunk/controller/inc/model/class.control_item_option.inc.php        
2012-05-29 01:33:39 UTC (rev 9450)
@@ -0,0 +1,67 @@
+<?php
+       /**
+       * phpGroupWare - controller: a part of a Facilities Management System.
+       *
+       * @author Erik Holm-Larsen <address@hidden>
+       * @author Torstein Vadla <address@hidden>
+       * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * This file is part of phpGroupWare.
+       *
+       * phpGroupWare is free software; you can redistribute it and/or modify
+       * it under the terms of the GNU General Public License as published by
+       * the Free Software Foundation; either version 2 of the License, or
+       * (at your option) any later version.
+       *
+       * phpGroupWare is distributed in the hope that it will be useful,
+       * but WITHOUT ANY WARRANTY; without even the implied warranty of
+       * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+       * GNU General Public License for more details.
+       *
+       * You should have received a copy of the GNU General Public License
+       * along with phpGroupWare; if not, write to the Free Software
+       * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 
 USA
+       *
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+       * @package property
+       * @subpackage controller
+       * @version $Id: class.control_item.inc.php 9404 2012-05-15 11:47:15Z 
vator $
+       */
+
+       include_class('controller', 'model', 'inc/model/');
+       
+       class controller_control_item_option extends controller_model
+       {
+               public static $so;
+               
+               protected $id;
+               protected $option_value;
+               protected $control_item_id;
+               
+               public function __construct($option_value, $control_item_id)
+               {
+                       $this->option_value = $option_value;
+                       $this->control_item_id = $control_item_id;
+               }
+               
+               public function set_id($id)
+               {
+                       $this->id = $id;
+               }
+               
+               public function get_id() { return $this->id; }
+
+               public function set_option_value($option_value)
+               {
+                       $this->option_value = $option_value;
+               }
+               
+               public function get_option_value() { return 
$this->option_value; }
+               
+               public function set_control_item_id($control_item_id)
+               {
+                       $this->control_item_id = $control_item_id;
+               }
+               
+               public function get_control_item_id() { return 
$this->control_item_id; }
+}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]