private function AddGroupField()
 {
     $name = 'Group';
     $tblMemberGroups = Membergroup::Schema()->Table();
     $field = new CheckList($name, $this->AssignedGroupIDs());
     $sql = Access::SqlBuilder();
     $order = $sql->OrderList($sql->OrderAsc($tblMemberGroups->Field('Name')));
     $groups = Membergroup::Schema()->Fetch(false, null, $order);
     foreach ($groups as $group) {
         $field->AddOption($group->GetID(), $group->GetName());
     }
     $this->AddField($field);
 }
示例#2
0
 /**
  * Creates a new instance of the check list field
  * @param CheckList $field
  */
 function __construct(CheckList $field)
 {
     $this->field = $field;
     $this->attribs = $field->GetHtmlAttributes();
 }
示例#3
0
 /**
  * Adds the member group options to the checklist
  * @param CheckList $field
  */
 private static function AddMembergroupOptions(CheckList $field)
 {
     $sql = Access::SqlBuilder();
     $tbl = Membergroup::Schema()->Table();
     $orderBy = $sql->OrderList($sql->OrderAsc($tbl->Field('Name')));
     $groups = Membergroup::Schema()->Fetch(false, null, $orderBy);
     foreach ($groups as $group) {
         $field->AddOption($group->GetID(), $group->GetName());
     }
 }