Source for file DBMS_FIELD_TEXTAREA.phpclass

Documentation is available at DBMS_FIELD_TEXTAREA.phpclass

  1. <?php
  2. /**
  3.  * Class file DBMS_FIELD_TEXTAREA.phpclass
  4.  *
  5.  * @project    Open CSP-Management
  6.  * @package    dbms_field
  7.  * @category   string
  8.  *
  9.  * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  10.  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  11.  *
  12.  * @version $Id:$
  13.  */
  14.  
  15.     // ---------------------------------------------------------------------------
  16.     // requirements
  17.     // ---------------------------------------------------------------------------
  18.  
  19.     pcf_require_class('DBMS_FIELD',dirname(__FILE__)."/");
  20.  
  21. /**
  22.  * handels long string (blob) fields
  23.  *
  24.  * @project    Open CSP-Management
  25.  * @package    dbms_field
  26.  * @category   string
  27.  *
  28.  * @author     Peter Krebs <pitlinz@users.sourceforge.net>
  29.  * @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  30.  *
  31.  * @version pk-03-11-27
  32.  * @version $Id:$
  33.  */
  34. class DBMS_FIELD_TEXTAREA extends DBMS_FIELD {
  35.     
  36.     // ---------------------------------------------------------------------------
  37.     // constants
  38.     // ---------------------------------------------------------------------------
  39.     
  40.     /**
  41.      * @constant string CLASS_SRC_FILE
  42.      */
  43.     const CLASS_SRC_FILE = __FILE__;
  44.  
  45.     // ---------------------------------------------------------------------------
  46.     // class (static)
  47.     // ---------------------------------------------------------------------------
  48.     
  49.     /*** class vars ------------------------------------------------------ */
  50.  
  51.     /*** class methods --------------------------------------------------- */    
  52.     
  53.     // ---------------------------------------------------------------------------
  54.     // object vars
  55.     // ---------------------------------------------------------------------------
  56.     
  57.     /*** compostion --------------------------------------------------- */
  58.     
  59.     /*** attributes --------------------------------------------------- */
  60.     
  61.     /**
  62.       * source file of the class
  63.       *
  64.       * @var string $classSrcFile 
  65.       * @since pk-05-01-20
  66.       */    
  67.     protected $className     = "Textarea";
  68.     
  69.     /**
  70.      * @var boolean $isSearchable the long field has an index
  71.      */
  72.     
  73.     protected $isSearchable  = False;
  74.     
  75.     /**
  76.      * @var int $rows number of rows of the textarea
  77.      */
  78.     protected $rows          = 5;
  79.     
  80.     /**
  81.      * @var int $cols number of cols of the textarea
  82.      */
  83.     protected $cols          = 50;
  84.     
  85.     /**
  86.      * @var boolean $nlToBr replace \n with <br />
  87.      */
  88.     protected $nlToBr        = True;
  89.     
  90.     /**
  91.      * @var string $wrap wrap {@link http://www.netzwelt.com/selfhtml/html/formulare/eingabe.htm#bereiche_umbruch} attrib of the textarea
  92.      */
  93.     protected $wrap          = "off";
  94.     
  95.     /**
  96.      * @var int $myROShowMode current showMode
  97.      * @version pk-03-10-10
  98.      */
  99.     protected $myROShowMode=0;
  100.  
  101.     /**
  102.      * @var bool $allowHTML use htmlspecialchars for output
  103.      ***/
  104.     protected $allowHTML = False;
  105.  
  106.     /**
  107.      * @staticvar array $static_RoShowmodes values of show mode in read only view
  108.      * @version pk-03-11-27 mode 2,3 added
  109.      * @version pk-05-03-14 mode 4 li added
  110.      * @note editTblForm() sets this array too, to add li to stored objects.
  111.      */
  112.     protected $static_Showmodes=array(0=>'ohne Tag',2=>'p',3=>'pre',1=>'textarea',4=>'li');
  113.     
  114.     /**
  115.      * @staticvar array $static_wrapMode values of wrap
  116.      * @version pk-03-10-10
  117.      ***/
  118.     protected $static_wrapMode=array('soft','hard','off');
  119.     
  120.     /**
  121.      * @var int $myHTMLOutMode 
  122.      * @since pk-05-03-25
  123.      ***/
  124.     protected $myHTMLOutMode=0;
  125.  
  126.     /**
  127.      * @var int $myLstOutMode 
  128.      * @since pk-05-03-25
  129.      ***/
  130.     protected $myLstOutMode=0;
  131.     
  132.     /**
  133.      * @var int $myLstOutSize 
  134.      * @since pk-05-03-25
  135.      ***/
  136.     protected $myLstOutSize=0;
  137.     
  138.     /**
  139.      * @var int $lstTAreaRows 
  140.      * @since pk-06-09-06
  141.      ***/
  142.     var $lstTAreaRows=4;
  143.     /**
  144.      * @var int $lstTAreaCols 
  145.      * @since pk-06-09-06
  146.      ***/
  147.     var $lstTAreaCols=20;
  148.  
  149.  
  150.     /**
  151.      * source file of the class
  152.      *
  153.      * @var string $classSrcFile 
  154.      * @since pk-05-01-13
  155.      ***/
  156.     protected $classSrcFile=__FILE__;
  157.  
  158.     /**
  159.      * @var int $srcVersion  current version of the source
  160.      * @since pk-05-03-25
  161.      ***/
  162.     var $srcVersion=2;    // pk-05-03-25
  163.  
  164.  
  165.  
  166.     /**
  167.      * xtype to use in the extJS framework for the field
  168.      *
  169.      * @var string $extJSxType 
  170.      */
  171.     protected $extJSxType = 'textarea';
  172.  
  173.     // ###########################################################
  174.     // OBJECT SETTINGS METHODS
  175.     // ###########################################################
  176.  
  177.     /**
  178.      * returns an array of field to bie shown in the edit form
  179.      * by using editTbl_echoForm
  180.      *
  181.      * the array is in the form:
  182.      *
  183.      * <code>
  184.      * [_sectionName_]
  185.      *      [TITLE] -> string
  186.      *      [_rowName_]
  187.      *         [FLDLAB]  (complete html code with <td></td>)
  188.      *         [FLDVAL] (complete html code with <td></td>)
  189.      * </code>
  190.      *
  191.      * @param boolean $debug 
  192.      *
  193.      * @returns array
  194.      *
  195.      * @since pk-06-04-26
  196.      * @version pk-06-04-29
  197.      *
  198.      ***/
  199.     function editTbl_getFieldEditArr($debug=False{
  200.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_FOREIGNKEY::editTbl_getFieldEditArr","",0);
  201.  
  202.         if ($this->srcVersion < 2{
  203.             // swap of mode 0 and 3 in pk-05-03-25
  204.             if ($this->myROShowMode==3$this->myROShowMode=0;
  205.             else if ($this->myROShowMode==0$this->myROShowMode=3;
  206.         }
  207.  
  208.         $a_ret=parent::editTbl_getFieldEditArr($debug);
  209.  
  210.         $a_ret['VALCHECKS']['FLD_ALLOWHTML']=array(
  211.             'FLDLAB' => "HTML Eingabe zulassen",
  212.             'FLDVAL' => "<input name=\"allowHTML\" type=\"checkbox\" value=\"1\" ".($this->allowHTML ? "checked=\"checked\" " "")."/>"
  213.             );
  214.  
  215.             $a_ret['LAYOUT']['FLD_SIZE']['FLDVAL']="
  216.                 ROWS: <input name=\"ROWS\" size=\"3\" value=\"".$this->rows."\" /> /
  217.                 COLS: <input name=\"COLS\" size=\"3\" value=\"".$this->cols."\" />
  218.             ";
  219.             $a_ret['LAYOUT']['FLDNL2BR']=array(
  220.             'FLDLAB'=>"Newline To &lt;br /&gt;",
  221.             'FLDVAL'=>"<input name=\"NLTOBR\" type=\"checkbox\" ".($this->nlToBr ? "checked" "")." value=\"1\" />"
  222.             );
  223.  
  224.             $a_ret['LAYOUT']['FLD_INPUTADD']['FLDLAB']="Zeilenumbruch";
  225.             $a_ret['LAYOUT']['FLD_INPUTADD']['FLDVAL']="<select name=\"WRAP\" size=1>\n";
  226.             foreach($this->static_wrapMode as $mode{
  227.                 $a_ret['LAYOUT']['FLD_INPUTADD']['FLDVAL'].="<option value=\"".$mode."\" ";
  228.                 if ($this->wrap==$mode$a_ret['LAYOUT']['FLD_INPUTADD']['FLDVAL'].=" selected ";
  229.                 $a_ret['LAYOUT']['FLD_INPUTADD']['FLDVAL'].=">".$mode."</option>";
  230.             }
  231.             $a_ret['LAYOUT']['FLD_INPUTADD']['FLDVAL'].="</select>";
  232.  
  233.             $a_ret['LAYOUT']['FLD_ROSHOW']['FLDLAB'="Readonly Anzeige";
  234.             $a_ret['LAYOUT']['FLD_ROSHOW']['FLDVAL'="<select name=\"myROShowMode\">\n";
  235.             if (!is_array($this->static_Showmodes)) {
  236.                 $this->static_Showmodes=array(0=>'ohne Tag',2=>'p',3=>'pre',1=>'textarea',4=>'li');
  237.             };
  238.             foreach($this->static_Showmodes as $key => $val{
  239.                 $a_ret['LAYOUT']['FLD_ROSHOW']['FLDVAL'].= "<option value=\"".$key."\" ";
  240.                 if ($key == $this->myROShowMode$a_ret['LAYOUT']['FLD_ROSHOW']['FLDVAL'].= " selected ";
  241.                 $a_ret['LAYOUT']['FLD_ROSHOW']['FLDVAL'].= ">".$val."</option>\n";
  242.             }
  243.             $a_ret['LAYOUT']['FLD_ROSHOW']['FLDVAL'].="</select>\n";
  244.  
  245.             $a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDLAB'="Online(HTML) Anzeige";
  246.             $a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDVAL'="<select name=\"myHTMLOutMode\">\n";
  247.             foreach($this->static_Showmodes as $key => $val{
  248.                 $a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDVAL'].= "<option value=\"".$key."\" ";
  249.                 if ($key == $this->myHTMLOutMode$a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDVAL'].= " selected ";
  250.                 $a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDVAL'].= ">".$val."</option>\n";
  251.             }
  252.             $a_ret['LAYOUT']['FLD_HTMLSHOW']['FLDVAL'].="</select>\n";
  253.  
  254.             $a_ret['LIST']['FLD_LSTSHOW']['FLDLAB'="Anzeige:";
  255.             $a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'="<select name=\"myLstOutMode\">\n";
  256.             foreach($this->static_Showmodes as $key => $val{
  257.                 $a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'].= "<option value=\"".$key."\" ";
  258.                 if ($key == $this->myLstOutMode$a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'].= " selected ";
  259.                 $a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'].= ">".$val."</option>\n";
  260.             }
  261.             $a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'].="</select>\n";
  262.             $a_ret['LIST']['FLD_LSTSHOW']['FLDVAL'].="max <input name=\"myLstOutSize\" style=\"text-align:right;\" size=\"4\" value=\"".$this->myLstOutSize."\" /> Zeichen";
  263.             $a_ret['LIST']['FLD_TAREADEF']=array(
  264.             'FLDLAB' => "Textarea Definition",
  265.             'FLDVAL' => "
  266.                 ROWS: <input name=\"lstTAreaRows\" size=\"3\" value=\"".$this->lstTAreaRows."\" /> /
  267.                 COLS: <input name=\"lstTAreaCols\" size=\"3\" value=\"".$this->lstTAreaCols."\" />
  268.             "
  269.             );
  270.  
  271.             return $a_ret;
  272.     }
  273.  
  274.     /**
  275.      * echos input form for field definition
  276.      *
  277.      * @param bool $showSize show size and maxlength input
  278.      * @version pk-03-10-10
  279.      * @version pk-06-11-29
  280.      ***/
  281.     function editTblForm($showSize=False,$allowHTML=True{
  282.         $a_FieldEditArr=$this->editTbl_getFieldEditArr($debug);
  283.         $this->editTbl_echoForm($a_FieldEditArr,$debug);
  284.     }
  285.  
  286.  
  287.     /**
  288.      * saves the field definition from $_POST array
  289.      *
  290.      * @version pk-03-10-10
  291.      */
  292.     function save({
  293.         if ($this->classSrcFile==__FILE__// <pk-05-12-11>
  294.             // set allowHTML and allowSQL if the field has been downgraded
  295.             $this->allowSQL =False;
  296.         }
  297.         parent::save();
  298.  
  299.         $this->allowHTML=((isset($_POST['allowHTML']&& intval($_POST['allowHTML'])) True False);
  300.  
  301.         if (intval($_POST['ROWS'])) {
  302.             $this->rows=intval($_POST['ROWS']);
  303.         }
  304.         if (intval($_POST['COLS'])) {
  305.             $this->cols=intval($_POST['COLS']);
  306.         }
  307.  
  308.         if ($this->allowHTML{
  309.             $this->nlToBr    = False;
  310.         else {
  311.             $this->allowHTML = False;
  312.             $this->nlToBr    = (intval($_POST['NLTOBR']True False );
  313.         }
  314.  
  315.         if (!empty($_POST['WRAP'])) $this->wrap=$_POST['WRAP'];
  316.  
  317.         $this->myROShowMode=intval($_POST['myROShowMode']);
  318.         $this->myHTMLOutMode=intval($_POST['myHTMLOutMode']);
  319.         if ($this->myHTMLOutMode==4{
  320.             // list output -> adjust wrap and nlToBr
  321.             $this->wrap="off";
  322.             $this->nlToBr=False;
  323.         }
  324.         $this->srcVersion=2;
  325.         $this->myLstOutMode=(intval($_POST['myLstOutMode']intval($_POST['myLstOutMode']"0");
  326.         $this->myLstOutSize=(intval($_POST['myLstOutSize']intval($_POST['myLstOutSize']"");
  327.  
  328.         $this->lstTAreaRows=intval($_POST['lstTAreaRows']);
  329.         $this->lstTAreaCols=intval($_POST['lstTAreaCols']);
  330.  
  331.         $this->extJSxType = 'textarea';
  332.  
  333.         return True;
  334.     }
  335.  
  336.     /**
  337.      * returns the html code for a editable formular element
  338.      *
  339.      * @param mixed $aValue the value to set
  340.      * @param string $arrName 
  341.      * @param string $nameAdd  append something to name like "[VALUE]" for search forms
  342.      *
  343.      * @return string 
  344.      *
  345.      * @since pk-04-09-09
  346.      * @version pk-06-01-19
  347.      * @version pk-07-09-24
  348.      *
  349.      */
  350.     function getInputTag($aValue,$arrName="DBVAL",$nameAdd="",$debug=False{
  351.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_TEXTAREA::getInputTag(\$aValue,$arrName,$nameAdd,...) [".$this->getKey()."]");
  352.  
  353.         // <pk-06-01-19>
  354.         if (isset($this->dbDesc['LEN']&& (intval($this->dbDesc['LEN'])256)) {
  355.             $b_limitedSize=True;
  356.         else {
  357.             $b_limitedSize=False;
  358.         }
  359.         // </pk-06-01-19>
  360.  
  361.         $tag  "<textarea ";
  362.         $tag .= "name=\"$arrName"."[".$this->myName."]\" ";
  363.         $tag .= "id=\"".$this->getDOMId()."\" ";
  364.         $tag .= "rows=\"".$this->rows."\" cols=\"".$this->cols."\" ";
  365.         $tag .= "wrap=\"".$this->wrap."\" ";
  366.         if ($b_limitedSize// <pk-06-01-19>
  367.             $tag .= "onKeyUp=\"
  368.                         var o_span=ocsp_getElem('charleft_".$this->getDOMId()."');
  369.                         if (o_span) {
  370.                             if (i_charleft=charLeft('".$this->getMyFormName()."','".$arrName."[".$this->myName."]',".intval($this->dbDesc['LEN']).")) {
  371.                                 o_span.innerHTML=i_charleft+' ".$this->myForm->getLangTxt('CHAR_LEFT')."';
  372.                             } else {
  373.                                 o_span.innerHTML='';
  374.                             }
  375.                         }
  376.                     \"";
  377.         // </pk-06-01-19>
  378.         $tag .= " >".htmlspecialchars($aValue)."</textarea>";
  379.         if ($b_limitedSize// <pk-06-01-19>
  380.             $tag.="<br><span id=\"charleft_".$this->getDOMId()."\" style=\"font-size:75%\">".intval($this->dbDesc['LEN'])." ".$this->myForm->getLangTxt('CHAR_LEFT')."</span>";
  381.         }// </pk-06-09-06>
  382.         return $tag;
  383.     }
  384.  
  385.     /**
  386.      * returns the html representation of the field
  387.      *
  388.      * @param mixed    $aValue     the falue
  389.      * @param string $arrName  name of the global array holding data values
  390.      * @param bool     $debug      show debug info
  391.      *
  392.      * @returns string the html representation of the field
  393.      *
  394.      * @version pk-07-01-14
  395.      * @version pk-07-11-28 ($this->allowHTML)
  396.      *
  397.      * @todo strip_tags
  398.      *
  399.      ***/
  400.     function getScreenValue($aValue=NULL,$arrName="DBVAL",$debug=False{
  401.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_TEXTAREA::getScreenValue()");
  402.  
  403.         if (empty($aValue)) return ""// <pk-07-01-14 />
  404.  
  405.         if (!$this->allowHTML)
  406.         {
  407.             $str_outValue=htmlspecialchars($aValue);
  408.         else {
  409.             $str_outValue=$aValue;
  410.         }
  411.  
  412.         switch(intval($this->myROShowMode)) {
  413.             case 1// textarea
  414.                 $tag  "<textarea ";
  415.                 $tag .= "name=\"$arrName"."[".$this->myName."]\" ";
  416.                 $tag .= "rows=\"".$this->rows."\" cols=\"".$this->cols."\" ";
  417.                 $tag .= "wrap=\"".$this->wrap."\" ";
  418.                 $tag .=" readonly>".$str_outValue."</textarea>";
  419.                 return $tag;
  420.             case 2// p
  421.                 return "<p>".$aValue."</p>";
  422.             case 3// pre
  423.                 return "<pre>".$str_outValue."</pre>";
  424.             case 4:  // list
  425.                 $aValue str_replace("\r","",$aValue);
  426.                 return "<ul><li>".str_replace("\n","</li>\n<li>",strip_tags($aValue))."</li></ul>"// <pk-07-01-14 />
  427.             default// without tag
  428.                 return parent::getScreenValue($aValue,$arrName,$debug)// <pk-06-07-22 /> E_ALL
  429.         }
  430.     }
  431.  
  432.     /**
  433.      * returns the html representation of the field in a list (table col)
  434.      *
  435.      * @param mixed    $aValue     the falue
  436.      * @param string $arrName  name of the global array holding data values
  437.      * @param bool     $debug      show debug info
  438.      *
  439.      * @returns mixed   the html representation of the field
  440.      *
  441.      * @since pk-06-09-06
  442.      * @version pk-07-01-14
  443.      * @version pk-07-11-28 ($this->allowHTML)
  444.      *
  445.      * @todo strip_tags
  446.      *
  447.      ***/
  448.     function getListValue($aValue=NULL,$arrName="DBVAL",$debug=False{
  449.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_TEXTAREA::getScreenValue()");
  450.  
  451.         if (empty($aValue)) return ""// <pk-07-01-14 />
  452.  
  453.         if (!$this->allowHTML)
  454.         {
  455.             $str_outValue=htmlspecialchars($aValue);
  456.         else {
  457.             $str_outValue=$aValue;
  458.         }
  459.  
  460.         switch(intval($this->myLstOutMode)) {
  461.             case 1// textarea
  462.                 $tag  "<textarea ";
  463.                 $tag .= "name=\"$arrName"."[".$this->myName."]\" ";
  464.                 $tag .= "rows=\"".$this->lstTAreaRows."\" cols=\"".$this->lstTAreaCols."\" ";
  465.                 $tag .= "wrap=\"".$this->wrap."\" ";
  466.                 $tag .=" readonly>".$str_outValue."</textarea>";
  467.                 return $tag;
  468.             case 2// p
  469.                 return "<p>".$aValue."</p>";
  470.             case 3// pre
  471.                 return "<pre>".$str_outValue."</pre>";
  472.             case 4:  // list
  473.                 $aValue str_replace("\r","",$aValue);
  474.                 return "<ul><li>".str_replace("\n","</li>\n<li>",strip_tags($aValue))."</li></ul>"// <pk-07-01-14 />
  475.             default// without tag
  476.                 if (intval($this->myLstOutSize&& (strlen($str_outValue$this->myLstOutSize)) {
  477.                     return substr(strip_tags($aValue),0,$this->myLstOutSize)."...";
  478.                 else {
  479.                     return parent::getListValue($aValue,$arrName,$debug);
  480.                 }
  481.         }
  482.     }
  483.  
  484.     /**
  485.      * gets a htmltag for the value
  486.      *
  487.      * this is mainly used in CMS Module
  488.      *
  489.      * @param mixed $aValue 
  490.      * @param string $arrName 
  491.      * @param boolean $debug 
  492.      *
  493.      * @returns string
  494.      *
  495.      * @since pk-05-03-25
  496.      * @version pk-05-12-11
  497.      * @version pk-07-01-14
  498.      *
  499.      ***/
  500.     function getHtmlTag($aValue,$arrName="DBVAL",$debug=False{
  501.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_TEXTAREA::getHtmlTag()",htmlspecialchars(substr($a_value,30))."....");
  502.  
  503.         if (empty($aValue)) return ""// <pk-07-01-14 />
  504.  
  505.         if (!isset($this->allowHTML|| !$this->allowHTML{
  506.             $htmlValue=htmlspecialchars($aValue);
  507.             if ($this->nlToBr{
  508.                 $htmlValue=nl2br($htmlValue);
  509.             }
  510.             if ($debugecho "<pre>".htmlspecialchars($htmlValue)."</pre>";
  511.         else {
  512.             $htmlValue=$aValue;
  513.         }
  514.  
  515.         switch(intval($this->myHTMLOutMode)) {
  516.             case 1// textarea
  517.                 $tag  "<textarea ";
  518.                 $tag .= "id=\"".$this->getDOMId()."\" ";
  519.                 $tag .= "name=\"$arrName"."[".$this->myName."]\" ";
  520.                 $tag .= "rows=\"".$this->rows."\" cols=\"".$this->cols."\" ";
  521.                 $tag .= "wrap=\"".$this->wrap."\" ";
  522.                 $tag .=" readonly>".htmlspecialchars($aValue)."</textarea>";
  523.                 return $tag;
  524.             case 2// p
  525.                 return "<p>".$htmlValue."</p>";
  526.             case 3// pre
  527.                 return "<pre>".$htmlValue."</pre>";
  528.             case 4:  /* <pk-05-03-14 />*/
  529.                 $aValue str_replace("\r","",$aValue);
  530.                 if ($listElems=explode("\n",$aValue)) {
  531.                     $ret="";
  532.                     foreach($listElems as $line{
  533.                         $ret.="<li>";
  534.                         if (!$this->allowHTML$ret.=htmlspecialchars($line);
  535.                         else                   $ret.=$line;
  536.                         $ret.="</li>\n";
  537.                     }
  538.                     return $ret;
  539.                 else {
  540.                     return "<li>".str_replace("\n","</li>\n<li>",$aValue)."</li>";
  541.                 }
  542.             default// without tag
  543.                 return $htmlValue;
  544.         }
  545.         return $aValue;
  546.     }
  547.  
  548.  
  549.     // --------------------------------------------------------
  550.     // jOCSP
  551.     // --------------------------------------------------------
  552.  
  553.     /**
  554.      * returns options of an ext js field config object
  555.      *
  556.      * NOTE the return string is NOT enclosed by {}
  557.      *
  558.      * @param boolean $debug 
  559.      *
  560.      * @return string (json)
  561.      *
  562.      * @since pk-08-09-09
  563.      */
  564.     public function getExtJSConfigOptions($debug=False)
  565.     {
  566.         if ($debugechoDebugMethod(__FILE__,get_class($this),"DBMS_FIELD_TEXTAREA::getExtJSConfigOptions()");
  567.          
  568.         $arr_ret parent::getExtJSConfigOptions($debug);
  569.  
  570.         $arr_ret['grow']     "true";
  571.         $arr_ret['growMin'($this->rows + 110;
  572.         $arr_ret['growMax'($this->rows + 120;
  573.         $arr_ret['width']    ($this->cols + 16;
  574.          
  575.         return $arr_ret;
  576.          
  577.     }
  578.  
  579. // end class DBMS_FIELD_TEXTAREA
  580. ?>

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