Source for file commentfield.php

Documentation is available at commentfield.php

  1. <?php
  2. /**
  3. * a non-SQL active field (for the information of the user, not the database)
  4. *
  5. @author    Stuart Prescott
  6. @copyright  Copyright Stuart Prescott
  7. @license    http://opensource.org/licenses/gpl-license.php GNU Public License
  8. @version    $Id$
  9. @package    Bumblebee
  10. @subpackage FormsLibrary
  11. */
  12.  
  13. /** Load ancillary functions */
  14. require_once 'inc/typeinfo.php';
  15.  
  16. /** parent object */
  17. require_once 'field.php';
  18.  
  19. /**
  20. * a non-SQL active field (for the information of the user, not the database)
  21. *
  22. @package    Bumblebee
  23. @subpackage FormsLibrary
  24. */
  25. class CommentField extends Field {
  26.  
  27.   /**
  28.   *  Create a new commet field object
  29.   *
  30.   * @param string $name   the name of the field (db name, and html field name
  31.   * @param string $longname  long name to be used in the label of the field in display
  32.   * @param string $description  used in the html title or longdesc for the field
  33.   */
  34.   function CommentField($name$longname=''$description=''{
  35.     parent::Field($name$longname$description);
  36.     $this->sqlHidden = 1;
  37.     $this->suppressValidation = 1;
  38.     $this->editable = 0;
  39.   }
  40.  
  41.   function displayInTable($cols=3{
  42.     $t '';
  43.     if ($this->hidden{
  44.       $t .= '<tr><td>'.$this->longname.'</td>'."\n"
  45.           .'<td title="'.$this->description.'">';
  46.       $t .= $this->selectable();
  47.       $t .= '</td>'."\n";
  48.       for ($i=0$i<$cols-2$i++{
  49.         $t .= '<td></td>';
  50.       }
  51.       $t .= '</tr>';
  52.     }
  53.     return $t;
  54.   }
  55.  
  56.   function selectable({
  57.     return xssqw($this->getValue());
  58.   }
  59.  
  60.   function hidden({
  61.     return '';
  62.   }
  63.  
  64. // class CommentField
  65.  
  66.  
  67. ?>

Documentation generated on Tue, 06 Mar 2007 10:01:05 +0000 by phpDocumentor 1.3.0