Source for file DBMS_FIELD_LAYOUT.phpclass

Documentation is available at DBMS_FIELD_LAYOUT.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_LAYOUT.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   layout
  8.   *
  9.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  10.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.   *
  12.   * @since pk-06-09-27
  13.   * @version $Id: DBMS_FIELD_LAYOUT.phpclass,v 1.3 2008/03/08 00:46:03 pitlinz Exp $
  14.   ***/
  15.  
  16. if (!class_exists('DBMS_FIELD'))
  17. {
  18.     require_once dirname(__FILE__)."/DBMS_FIELD.phpclass";
  19. }
  20.  
  21. /**
  22.   * Class DBMS_FIELD_LAYOUT_LINKBTTN
  23.   *
  24.   * @project    Open CSP-Management
  25.   * @package    dbms_field
  26.   * @category   layout
  27.   *
  28.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  29.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  30.   *
  31.   * @since pk-06-09-27
  32.   * @version $Id: DBMS_FIELD_LAYOUT.phpclass,v 1.3 2008/03/08 00:46:03 pitlinz Exp $
  33.   */
  34.     extends DBMS_FIELD 
  35. {
  36.  
  37.     // ###########################################################
  38.     // OBJECT (CONST) VAR DECLARATION
  39.     // ###########################################################
  40.  
  41.     /**
  42.       * source file of the class
  43.       * @staticvar string $classSrcFile 
  44.       * @access protected
  45.       ***/
  46.     protected $classSrcFile=__FILE__;
  47.  
  48.  
  49.     // ###########################################################
  50.     // OBJECT SETTINGS METHODS
  51.     // ###########################################################
  52.  
  53.     /**
  54.       * returns an array of field to bie shown in the edit form
  55.       * by using editTbl_echoForm
  56.       *
  57.       * the array is in the form:
  58.       *
  59.       * <code>
  60.       * [_sectionName_]
  61.       *      [TITLE] -> string
  62.       *      [_rowName_]
  63.       *         [FLDLAB]  (complete html code with <td></td>)
  64.       *         [FLDVAL] (complete html code with <td></td>)
  65.       * </code>
  66.       *
  67.       * @param boolean $debug 
  68.       *
  69.       * @returns array
  70.       *
  71.       * @version pk-07-02-14
  72.       *
  73.       ***/
  74.     function editTbl_getFieldEditArr($debug=FALSE{
  75.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_LAYOUT_LINKBTTN::editTbl_getFieldEditArr","",0);
  76.         $a_ret=parent::editTbl_getFieldEditArr($debug);
  77.  
  78.         unset($a_ret['COMMON']['FRM_DBCOL']);
  79.         unset($a_ret['COMMON']['FRM_DBDESC']);
  80.         unset($a_ret['COMMON']['FRM_DEFVAL']);
  81.         unset($a_ret['VALCHECKS']);
  82.  
  83.         // <pk-07-02-14>
  84.         unset($a_ret['SHOW']['FLD_ALLOW']);
  85.         $a_ret['SHOW']['FLD_SHOWMOD']=array(
  86.                 'FLDLAB'=>"RO Anzeige:",
  87.                 'FLDVAL'=>"<input name=\"SHOWREADONLY\" type=\"checkbox\" ".($this->hideReadOnly ? "" "checked")." value=\"1\">ja ReadOnly anzeigen"
  88.         );
  89.  
  90.         unset($a_ret['LAYOUT']['FLD_TABIDX']);
  91.         unset($a_ret['LAYOUT']['FLD_SIZE']);
  92.         unset($a_ret['LAYOUT']['FLD_INPUTADD']);
  93.         // <pk-07-02-14>
  94.  
  95.         return $a_ret;
  96.     }
  97.  
  98.     /**
  99.       * echos the filed definition form
  100.       * as not all classes alread have the method editTbl_getFieldEditArr
  101.       * we had to implement this here
  102.       *
  103.       * @param boolean $debug 
  104.       *
  105.       * @deprecated since pk-06-09-12
  106.       *
  107.       ***/
  108.      function editTblForm($debug=FALSE{
  109.         $a_FieldEditArr=$this->editTbl_getFieldEditArr($debug);
  110.         $this->editTbl_echoForm($a_FieldEditArr,$debug);
  111.     }
  112.  
  113.     /**
  114.       * save the filed definition form
  115.       *
  116.       * @returns boolean
  117.       *
  118.       * @version pk-05-12-11
  119.       * @version pk-07-02-14
  120.       *
  121.       ***/
  122.     function save({
  123.         $ret=parent::save();
  124.  
  125.         $this->isSearchable    =FALSE;
  126.  
  127.         // <pk-07-02-14>
  128.         $this->enableNew       =FALSE;
  129.         $this->enableEdit      =FALSE;
  130.         $this->enableCopy      =FALSE;
  131.  
  132.         $this->size            =0;
  133.         $this->maxlength       =0;
  134.         $this->defaultValue    ="";
  135.         $this->allowNull       =TRUE;
  136.         $this->nullErrMsg      ="";
  137.         // </pk-07-02-14>
  138.  
  139.         return TRUE;
  140.     }
  141.  
  142.     // ###########################################################
  143.     // OBJECT DATA METHODS
  144.     // ###########################################################
  145.  
  146.  
  147.     // ###########################################################
  148.     // OBJECT HTML FORM METHODS
  149.     // ###########################################################
  150.  
  151.     /**
  152.      * returns if the field is a layout only field
  153.      *  
  154.      * @return boolean 
  155.      */
  156.     function isLayoutFld({
  157.         return true;
  158.     }
  159.     
  160.     
  161.  
  162.     // ###########################################################
  163.     // SEARCH FORM METHODS
  164.     // ###########################################################
  165.  
  166.  
  167.     // ###########################################################
  168.     // OBJECT HTML FORM METHODS
  169.     // ###########################################################
  170.  
  171.  
  172.     // ###########################################################
  173.     // OBJECT VALUE CHECK METHODS
  174.     // ###########################################################
  175.  
  176.  
  177. // end class DBMS_FIELD_LAYOUT_LINKBTTN
  178. ?>

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