Source for file DBMS_FIELD_LAYOUT_SHOWTMPL.phpclass

Documentation is available at DBMS_FIELD_LAYOUT_SHOWTMPL.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_LAYOUT_SHOWTMPL.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-05-12-28
  13.   *
  14.   ***/
  15.  
  16. require_once dirname(__FILE__)."/DBMS_FIELD_LAYOUT.phpclass";
  17.  
  18.  
  19. /**
  20.   * Class DBMS_FIELD_LAYOUT_SHOWTMPL
  21.   *
  22.   * @project    Open CSP-Management
  23.   * @package    dbms_field
  24.   * @category   layout
  25.   *
  26.   * @author     Peter Krebs <pitlinz@sourceforge.net>
  27.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  28.   *
  29.   * @since pk-05-12-28
  30.   *
  31.   ***/
  32.  
  33.     // ###########################################################
  34.     // OBJECT (CONST) VAR DECLARATION
  35.     // ###########################################################
  36.  
  37.     /**
  38.       * source file of the class
  39.       * @staticvar string $classSrcFile 
  40.       * @access protected
  41.       ***/
  42.     protected $classSrcFile=__FILE__;
  43.  
  44.     /**
  45.       * @var boolean $outputTemplate 
  46.       ***/
  47.     var $outputTemplate="";
  48.  
  49.  
  50.     // ###########################################################
  51.     // OBJECT SETTINGS METHODS
  52.     // ###########################################################
  53.  
  54.     /**
  55.       * save the filed definition form
  56.       *
  57.       * @returns boolean
  58.       *
  59.       ***/
  60.     function save({
  61.         $b_ret=parent::save();
  62.         $this->outputTemplate=(isset($_POST['outputTemplate']$_POST['outputTemplate'"");
  63.         return $b_ret;
  64.     }
  65.  
  66.     // ###########################################################
  67.     // OBJECT DATA METHODS
  68.     // ###########################################################
  69.  
  70.  
  71.     // ###########################################################
  72.     // OBJECT HTML FORM METHODS
  73.     // ###########################################################
  74.  
  75.  
  76.     /**
  77.       * html output of the field (no value)
  78.       *
  79.       * @param int      $mode       show mode of the field
  80.       * @param mixed    $aValue     value of the field
  81.       * @param string   $arrName    array in Name of the html input form <input name=ARRNAME[FIELDNAME]>
  82.       *                              it also needs to be a global array global ${$arrName}
  83.       * @param bool     $debug      show debug info
  84.       *
  85.       * @return bool    TRUE if an input field is written
  86.       *
  87.       * @version pk-04-12-28
  88.       * @version pk-05-02-04 set $fld->myDataArrName
  89.       *
  90.       ***/
  91.     function getFieldTag($mode,$aValue="",$debug=FALSE{
  92.         global ${$this->myDataArrName};
  93.  
  94.         $debug=($debug || $this->fldDebug)/* <pk-04-12-28 /> */
  95.         if ($debug{
  96.             echoDebug(__FILE__,"<p><b>DBMS_FIELD_LAYOUT_SHOWTMPL::getFieldTag($mode,$aValue,$debug)</b></p>",0);
  97.         }
  98.         $frmObj=$this->getMyForm();
  99.         $fldLst=$frmObj->getFieldArr(TRUE);
  100.         $sep="";$comma="";
  101.         $ret="";
  102.         if ($debugechoDebug(__FILE__,"<blockquote><p>myKey: ".$this->getKey()."<br />Fields: </p><pre>".print_r($this->grpfldList,TRUE)."</pre>",1);
  103.         foreach($fldLst as $key => $fld{
  104.             if ($debugechoDebug(__FILE__,"<p>Checking Field: ".$fld->getKey()."</p>",2);
  105.             if (in_array($fld->getKey(),$this->grpfldList)) {
  106.                 if (!$fld->isHidden{
  107.                     $fld->myDataArrName $this->myDataArrName/* <pk-05-02-04 /> */
  108.                     if ($debugechoDebug(__FILE__,"<blockquote>Adding Field: ".($fld->getKey())." (".get_class($fld->getKey()).") Value: ".${$this->myDataArrName}[$fld->myName]."</blockquote>",2);
  109.                     $ret.=$sep;
  110.                     $ret.=$fld->getFieldTag($mode,${$this->myDataArrName}[$fld->myName],$debug,FALSE);
  111.                     $ret.=" ".$fld->getLabel()." ";
  112.                     $GLOBALS['TMP_GRPFIELDS_'.$this->myFrmId].=$comma.$fld->myName;
  113.                     $comma=",";
  114.                     $sep $this->grpfldSep;
  115.                 else {
  116.                     if ($debugechoDebug(__FILE__,"<blockqoute>Found but hidden</blockquote>",1);
  117.                 }
  118.             }
  119.         }
  120.         if ($debugechoDebug(__FILE__,"</blockquote>",1);
  121.         $ret.=$this->addTag;
  122.         return $ret;
  123.     }
  124.  
  125.  
  126.     // ###########################################################
  127.     // SEARCH FORM METHODS
  128.     // ###########################################################
  129.  
  130.  
  131.     // ###########################################################
  132.     // OBJECT HTML FORM METHODS
  133.     // ###########################################################
  134.  
  135.  
  136.     // ###########################################################
  137.     // OBJECT VALUE CHECK METHODS
  138.     // ###########################################################
  139.  
  140.  
  141. // end class DBMS_FIELD_LAYOUT_SHOWTMPL
  142. ?>

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