Source for file group.php

Documentation is available at group.php

  1. <?php
  2. /**
  3. * Group editing object
  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 DBObjects
  11. */
  12.  
  13. /** Load ancillary functions */
  14. require_once 'inc/typeinfo.php';
  15.  
  16. /** parent object */
  17. require_once 'inc/formslib/dbrow.php';
  18. require_once 'inc/formslib/idfield.php';
  19. require_once 'inc/formslib/textfield.php';
  20.  
  21. /**
  22. * Group editing object
  23. *
  24. @package    Bumblebee
  25. @subpackage DBObjects
  26. */
  27. class Group extends DBRow {
  28.   
  29.   function Group($id{
  30.     //$this->DEBUG=10;
  31.     $this->DBRow('groups'$id);
  32.     $this->editable = 1;
  33.     //$this->use2StepSync = 1;
  34.     $this->deleteFromTable = 0;
  35.     $f new IdField('id'T_('Group ID'));
  36.     $f->editable 0;
  37.     $this->addElement($f);
  38.     $f new TextField('name'T_('Addressee name'));
  39.     $attrs array('size' => '48');
  40.     $f->setAttr($attrs);
  41.     $f->required 1;
  42.     $f->isValidTest 'is_nonempty_string';
  43.     $this->addElement($f);
  44.     $f new TextField('longname'T_('Group name'));
  45.     $f->setAttr($attrs);
  46.     $f->required 1;
  47.     $f->isValidTest 'is_nonempty_string';
  48.     $this->addElement($f);
  49.     $f new TextField('addr1'T_('Address 1'));
  50.     $f->setAttr($attrs);
  51.     $this->addElement($f);
  52.     $f new TextField('addr2'T_('Address 2'));
  53.     $f->setAttr($attrs);
  54.     $this->addElement($f);
  55.     $f new TextField('suburb'T_('Suburb'));
  56.     $f->setAttr($attrs);
  57.     $this->addElement($f);
  58.     $f new TextField('state'T_('State'));
  59.     $f->setAttr($attrs);
  60.     $this->addElement($f);
  61.     $f new TextField('code'T_('Postcode'));
  62.     $f->setAttr($attrs);
  63.     $this->addElement($f);
  64.     $f new TextField('country'T_('Country'));
  65.     $f->setAttr($attrs);
  66.     $this->addElement($f);
  67.     $f new TextField('email'T_('Email'));
  68.     $f->setAttr($attrs);
  69.     $f->required 1;
  70.     $f->isValidTest 'is_email_format';
  71.     $this->addElement($f);
  72.     $f new TextField('fax'T_('Fax'));
  73.     $f->setAttr($attrs);
  74.     $this->addElement($f);
  75.     $f new TextField('account'T_('Account code'));
  76.     $f->setAttr($attrs);
  77.     $this->addElement($f);
  78.     $this->fill($id);
  79.     $this->dumpheader = 'Group object';
  80.   }
  81.  
  82.   function display({
  83.     return $this->displayAsTable();
  84.   }
  85.  

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