/** * get HTML admin subfields parameters * * @return string : the html admin * @access public */ function getHTMLSubFieldsParametersUsersGroupsField($language, $prefixName) { $params = $this->getParamsValues(); $values = $this->_parameterValues; $input = ''; $parameters = $this->getSubFieldParameters(); foreach ($parameters as $parameterID => $parameter) { $paramValue = $values[$parameterID]; if ($parameter["type"] == "usersGroupsField") { //get usersGroups fields for current object $fields = CMS_poly_object_catalog::getFieldsDefinition($this->_field->getValue('objectID')); $usersGroupsfields = array(); foreach ($fields as $field) { if ($field->getValue('type') == 'CMS_object_usergroup') { //get label of current field $label = new CMS_object_i18nm($field->getValue('labelID')); if (is_a($language, "CMS_language")) { $label = $label->getValue($language->getCode()); } else { $label = $label->getValue($language); } $usersGroupsfields[$field->getID()] = $label; } } $s_items_listbox = CMS_dialog_listboxes::getListBox(array('field_name' => $prefixName . $parameter['internalName'], 'items_possible' => $usersGroupsfields, 'default_value' => $params[$parameter["internalName"]], 'attributes' => 'class="admin_input_text" style="width:250px;"')); $input .= $s_items_listbox; } } return $input; }
/** * Create a select box XHTML containing all categories user has access to * View CMS_dialog_listboxes::getListBox for detail * @param mixed array() $args, This array contains all parameters. * @return string, XHTML formated */ static function getListBox($args) { return CMS_dialog_listboxes::getListBox($args); }