Source for file DBMS_FIELD_CMS_PAGECLASSSELECT.phpclass

Documentation is available at DBMS_FIELD_CMS_PAGECLASSSELECT.phpclass

  1. <?php
  2. /**
  3.   * Class file DBMS_FIELD_CMS_PAGECLASSSELECT.phpclass
  4.   *
  5.   * @project    Open CSP-Management
  6.   * @package    dbms_field
  7.   * @category   any
  8.   *
  9.   * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  10.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.   *
  12.   * @since pk-05-11-14
  13.   * @version $Id: DBMS_FIELD_CMS_PAGECLASSSELECT.phpclass,v 1.4 2008/11/24 23:30:31 pitlinz Exp $
  14.   */
  15.  
  16.  
  17.     pcf_require_class('DBMS_FIELD_SELECTLIST',dirname(__FILE__"/");
  18.     pcf_require_class('OCSP_CMS_CONF',"cms/");
  19.  
  20. /**
  21.   * Class DBMS_FIELD_CMS_PAGECLASSSELECT
  22.   *
  23.   * @project    Open CSP-Management
  24.   * @package    dbms_field
  25.   * @category   any
  26.   *
  27.   * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  28.   * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  29.   *
  30.   * @since pk-05-11-14
  31.   * @version $Id: DBMS_FIELD_CMS_PAGECLASSSELECT.phpclass,v 1.4 2008/11/24 23:30:31 pitlinz Exp $
  32.   */
  33.     var $className       = "CMS pageclass";
  34.     var $allowNullSelect = False;
  35.  
  36.     // ###########################################################
  37.     // FIELD DEFINITION DATA METHODS
  38.     // ###########################################################
  39.  
  40.     /**
  41.       * returns an array of field to bie shown in the edit form
  42.       * by using editTbl_echoForm
  43.       *
  44.       * the array is in the form:
  45.       *
  46.       * <code>
  47.       * [_sectionName_]
  48.       *      [TITLE] -> string
  49.       *      [_rowName_]
  50.       *         [FLDLAB]  (complete html code with <td></td>)
  51.       *         [FLDVAL] (complete html code with <td></td>)
  52.       * </code>
  53.       *
  54.       * @param boolean $debug 
  55.       *
  56.       * @returns array
  57.       *
  58.       * @since pk-06-09-29
  59.       *
  60.       ***/
  61.     function editTbl_getFieldEditArr($debug=False{
  62.         if ($debugechoDebugMethode(__FILE__,get_class($this),"DBMS_FIELD_CMS_PAGECLASSSELECT::editTbl_getFieldEditArr()");
  63.  
  64.         $a_ret=parent::editTbl_getFieldEditArr($debug);
  65.         unset($a_ret['SELECT']);
  66.  
  67.         return $a_ret;
  68.     }
  69.  
  70.  
  71.     /**
  72.       * reads the post values sent by editTblForm and
  73.       * sets it to object values
  74.       * NOTE: does not write to the db
  75.       *
  76.       * @returns boolean
  77.       *
  78.       * @since pk-06-09-29
  79.       *
  80.       ***/
  81.     function save({
  82.         if (parent::save()) {
  83.             $this->showNullOption       = False;
  84.             $this->multiselect          = False;
  85.             $this->showAsCheckRadio     = False;
  86.             $this->notInLstValues       = True;
  87.             $this->selectsize           =1;
  88.             $this->reloadFormOnChange   =True;
  89.             $this->lstValueIsHtml       =False;
  90.             return True;
  91.         else {
  92.             return False;
  93.         }
  94.     }
  95.  
  96.     /**
  97.       * sets $this->myValues
  98.       *
  99.       * @param string $arrName 
  100.       * @param bool $debug 
  101.       *
  102.       * @since pk-05-11-14
  103.       * @version pk-08-08-11
  104.       */
  105.     function setMyValues($arrName="DBVAL",$debug=False{
  106.         $this->myValues=array();
  107.         $arr_pageTypes CMS_TABLEOBJ::pageType_getList($debug);
  108.         
  109.         foreach($arr_pageTypes as $str_key => $arr_def
  110.         {
  111.             $this->myValues[$str_key]=$arr_def['PAT_TITLE'];
  112.         }
  113.     }
  114.  
  115.     /**
  116.      * returns additional object elements of the field object
  117.      * 
  118.      * always
  119.      * 
  120.      * array definition: [elemName] = value
  121.      * 
  122.      * NOTE: do not js_escapte value this is done when building the json object
  123.      *
  124.      * @param boolean $debug 
  125.      * 
  126.      * @return array 
  127.      * 
  128.      * @since pk-08-02-06
  129.      * @version pk-08-06-02
  130.      */
  131.     protected function jOCSP_getAdditonalFieldObjElems($debug=False)
  132.     {        
  133.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_SELECTLIST::jOCSP_getAdditonalFieldObjElems();");                
  134.  
  135.         $arr_ret parent::jOCSP_getAdditonalFieldObjElems($debug);
  136.         
  137.         switch($this->reloadFormOnChange)
  138.         {
  139.             case "0"
  140.                 $arr_ret['reloadOnChange'"false";
  141.                 break;
  142.             case "1"
  143.             case "2":                
  144.                 if (!($str_reloadUrl $this->getControl()->getReloadUrl()) || empty($str_reloadUrl))
  145.                 {
  146.                     $str_reloadUrl OCSP_OBJ::getConf('SYSTEMURL'"jOCSP/formRPC.php";
  147.                 }
  148.                 $arr_ret['reloadUrl'"'" pcf_js_escape($str_reloadUrl"'";
  149.                 $arr_ret['reloadOnChange'"true";
  150.                 break
  151.             default
  152.                 $arr_ret['reloadOnChange'"false";                
  153.                 $arr_ret['doReload'"function(aValue) {alert('reload type not defined');}";
  154.         }
  155.                 
  156.         return $arr_ret;
  157.     }    
  158.  
  159.  
  160. // end class DBMS_FIELD_CMS_PAGECLASSSELECT
  161. ?>

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