Source for file DBMS_FIELD_PROJECTSELECT.phpclass

Documentation is available at DBMS_FIELD_PROJECTSELECT.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_PROJECTSELECT.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   int
  8.   *
  9.   * @author     Peter Krebs <p.krebs@lvus.at>
  10.   * @copyright  (c) 2002-2005 by Peter Krebs and LVUS
  11.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  12.   *
  13.   ***/
  14.  
  15. pcf_require_class('DBMS_FIELD_FOREIGNKEY',dirname(__FILE__)."/");
  16.  
  17. /**
  18.   * Class file DBMS_FIELD_PROJECTSELECT.phpclass
  19.   *
  20.   * @project    Open CSP-Management
  21.   * @package    dbms_field
  22.   * @category   int
  23.   *
  24.   * @author     Peter Krebs <p.krebs@lvus.at>
  25.   * @copyright  (c) 2002-2005 by Peter Krebs and LVUS
  26.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  27.   *
  28.   * @since pk-03-10-30
  29.   * @version pk-07-08-31
  30.   *
  31.   ***/
  32. {
  33.     // ---------------------------------------------------------------------------
  34.     // constants
  35.     // ---------------------------------------------------------------------------
  36.     
  37.     /**
  38.      * @constant string CLASS_SRC_FILE
  39.      */
  40.     const CLASS_SRC_FILE = __FILE__;
  41.  
  42.     // ---------------------------------------------------------------------------
  43.     // class (static)
  44.     // ---------------------------------------------------------------------------
  45.     
  46.     /*** class vars ------------------------------------------------------ */
  47.  
  48.     /*** class methods --------------------------------------------------- */    
  49.     
  50.     // ---------------------------------------------------------------------------
  51.     // object vars
  52.     // ---------------------------------------------------------------------------
  53.     
  54.     /*** compostion --------------------------------------------------- */
  55.     
  56.     var $className      = "Project Select List";
  57.  
  58.     /**
  59.       * source file of the class
  60.       *
  61.       * @var string $classSrcFile 
  62.       * @since pk-05-01-20
  63.       ***/
  64.     protected $classSrcFile=__FILE__;
  65.  
  66.     
  67.     protected $lookupTable    = "T_CMS_PROJECT";
  68.     protected $lookupShowField"CONCAT(PROJ_NAME,' (',PROJ_ID,')')";
  69.     protected $keyField       = "PROJ_ID";
  70.     protected $sortField      = "PROJ_NAME";
  71.     protected $nullLabel      = "Default Project";
  72.  
  73.     /**
  74.       * returns an array of field to bie shown in the edit form
  75.       * by using editTbl_echoForm
  76.       *
  77.       * the array is in the form:
  78.       *
  79.       * <code>
  80.       * [_sectionName_]
  81.       *      [TITLE] -> string
  82.       *      [_rowName_]
  83.       *         [FLDLAB]  (complete html code with <td></td>)
  84.       *         [FLDVAL] (complete html code with <td></td>)
  85.       * </code>
  86.       *
  87.       * @param boolean $debug 
  88.       *
  89.       * @returns array
  90.       *
  91.       * @since pk-06-04-26
  92.       * @version pk-06-04-29
  93.       *
  94.       ***/
  95.     function editTbl_getFieldEditArr($debug=FALSE)
  96.     {
  97.         $arr_ret=parent::editTbl_getFieldEditArr();
  98.         if (isset($a_ret['DBLOOKUP']['FLD_LUTBL']))      unset($a_ret['DBLOOKUP']['FLD_LUTBL']);
  99.         if (isset($a_ret['DBLOOKUP']['FLD_SHOWFRMFLD'])) unset($a_ret['DBLOOKUP']['FLD_SHOWFRMFLD']);
  100.         return $arr_ret;
  101.     }
  102.  
  103.     function save({
  104.         $ret=parent::save();
  105.  
  106.         $this->lookupTable      = "T_CMS_PROJECT";
  107.         $this->lookupShowField  = "CONCAT(PROJ_NAME,' (',PROJ_ID,')')";
  108.         $this->keyField         = "PROJ_ID";
  109.         $this->sortField        = "PROJ_NAME";
  110.         $this->nullLabel        = "Default Project";
  111.         $this->nullValue        0;
  112.         return $ret;
  113.     }
  114. }
  115. ?>

Documentation generated on Thu, 08 Jan 2009 17:42:37 +0100 by phpDocumentor 1.4.0a2