/** * @param interface_usersources_group|class_model $objGroup * * @return class_admin_formgenerator */ private function getGroupForm(interface_usersources_group $objGroup) { $objForm = new class_admin_formgenerator("group", $objGroup); //add the global group-name $objForm->addField(new class_formentry_text("group", "name"))->setBitMandatory(true)->setStrLabel($this->getLang("group_name"))->setStrValue($this->getParam("group_name")); if ($objGroup->isEditable()) { //adding elements is more generic right here - load all methods $objAnnotations = new class_reflection($objGroup); $arrProperties = $objAnnotations->getPropertiesWithAnnotation("@fieldType"); foreach ($arrProperties as $strProperty => $strValue) { $objForm->addDynamicField($strProperty); } } $objGroup->updateAdminForm($objForm); return $objForm; }
/** * Returns the number of members of the current group. * * @return int */ public function getNumberOfMembers() { $this->loadSourceObject(); return $this->objSourceGroup->getNumberOfMembers(); }