Add fieldsets of placeholders to the list of already
        existing fieldsets.
499214
def get_fieldsets(self, request, obj=None):
        

        # some ugly business to remove freeze_date
        # from the field list
        general_module = {
            'fields': list(self.general_fields),
            'classes': ('module-general',),
        }

        default_fieldsets = list(self.fieldsets)
        if not request.user.has_perm('pages.can_freeze'):
            general_module['fields'].remove('freeze_date')
        if not request.user.has_perm('pages.can_publish'):
            general_module['fields'].remove('status')
        if not len(registry):
            general_module['fields'].remove('delegate_to')

        default_fieldsets[0][1] = general_module

        placeholder_fieldsets = []
        section_placeholder_fieldsets = defaultdict(list)
        template = get_template_from_request(request, obj)
        for placeholder in get_placeholders(template):
            if placeholder.ctype not in self.mandatory_placeholders and not placeholder.section:
                placeholder_fieldsets.append(placeholder.ctype)
            elif placeholder.section:
                section_placeholder_fieldsets[placeholder.section].append(placeholder.ctype)

        additional_fieldsets = []
        for title, fieldset in section_placeholder_fieldsets.items():
            additional_fieldsets.append((title, {
                'fields': fieldset,
                'classes': ('module-content collapse grp-collapse grp-closed',),
            }))
        additional_fieldsets.append((_('Content'), {
            'fields': placeholder_fieldsets,
            'classes': ('module-content',),
        }))
        return default_fieldsets + additional_fieldsets
1263928
def add_fields(self, form, index):
        
        super(ColumnFormSet, self).add_fields(form, index)
        form.fields['column'].choices = self.get_choices()
413511
public void addReadFields2(FieldSet readFields) {
		if(this.readFields2 == null) {
			this.readFields2 = new FieldSet(readFields);
		} else {
			this.readFields2.addAll(readFields);
		}
	}
268072
private function addFacetFields(Fieldset $fieldset)
    {
        $fieldset->addField(
            'facet_min_coverage_rate',
            'text',
            [
                'name'  => 'facet_min_coverage_rate',
                'label' => __('Facet coverage rate'),
                'class' => 'validate-digits validate-digits-range digits-range-0-100',
                'value' => '90',
                'note'  => __('Ex: Brand facet will be displayed only if 90% of the product have a brand.'),
            ],
            'is_filterable_in_search'
        );

        $fieldset->addField(
            'facet_max_size',
            'text',
            [
                'name'  => 'facet_max_size',
                'label' => __('Facet max. size'),
                'class' => 'validate-digits validate-greater-than-zero',
                'value' => '10',
                'note'  => __('Max number of values returned by a facet query.'),
            ],
            'facet_min_coverage_rate'
        );

        $fieldset->addField(
            'facet_sort_order',
            'select',
            [
                'name'   => 'facet_sort_order',
                'label'  => __('Facet sort order'),
                'values' => $this->filterSortOrder->toOptionArray(),
            ],
            'facet_max_size'
        );

        return $this;
    }
577501
private void addNestedField(FieldDefinition nestedFieldDef) {
        // Prerequisites
        assert nestedFieldDef != null;
        assert m_type == FieldType.GROUP;
        Utils.require(!m_nestedFieldMap.containsKey(nestedFieldDef.getName()),
                      "Duplicate nested field name: %s", nestedFieldDef.getName());
        
        // Add it to us and point it at us.
        m_nestedFieldMap.put(nestedFieldDef.getName(), nestedFieldDef);
        nestedFieldDef.m_parentField = this;
    }
339700
def add (self, ps):
        
        assert isinstance(ps, PropertySet)
        if ps not in self.added_:
            self.added_[ps] = create(self.all_ + ps.all())
        return self.added_[ps]
234543
def insertFeatureSet(self, featureSet):
        
        # TODO add support for info and sourceUri fields.
        try:
            models.Featureset.create(
                id=featureSet.getId(),
                datasetid=featureSet.getParentContainer().getId(),
                referencesetid=featureSet.getReferenceSet().getId(),
                ontologyid=featureSet.getOntology().getId(),
                name=featureSet.getLocalId(),
                dataurl=featureSet.getDataUrl(),
                attributes=json.dumps(featureSet.getAttributes()))
        except Exception as e:
            raise exceptions.RepoManagerException(e)
1115437
@SuppressWarnings("unchecked")
	public Q includeFields(final Set<String> fields) {
		if (this.fields == null) {
			this.fields = new HashSet<>();
		}

		if (fields != null) {
			this.fields.addAll(fields);
		}

		return (Q) this;
	}
372958
def normalize_fieldsets(fieldsets):
    
    result = []
    for name, options in fieldsets:
        result.append((name, normalize_dictionary(options)))
    return result
101745
public function updateCMSFields(FieldList $fields)
    {
        // Define Placeholder:
        
        $placeholder = _t(__CLASS__ . '.DROPDOWNSELECT', 'Select');
        
        // Create Main Fields:
        
        $fields->addFieldsToTab(
            'Root.Main',
            [
                DropdownField::create(
                    'ListSourceID',
                    $this->owner->fieldLabel('ListSourceID'),
                    $this->getListSourceOptions()
                )->setEmptyString(' ')->setAttribute('data-placeholder', $placeholder)
            ]
        );
        
        // Create Options Fields:
        
        $fields->addFieldToTab(
            'Root.Options',
            FieldSection::create(
                'ListSourceOptions',
                $this->owner->fieldLabel('ListSourceOptions'),
                [
                    TextField::create(
                        'NumberOfItems',
                        $this->owner->fieldLabel('NumberOfItems')
                    ),
                    DropdownField::create(
                        'SortItemsBy',
                        $this->owner->fieldLabel('SortItemsBy'),
                        $this->owner->getSortItemsByOptions()
                    ),
                    CheckboxField::create(
                        'ReverseItems',
                        $this->owner->fieldLabel('ReverseItems')
                    ),
                    CheckboxField::create(
                        'ImageItems',
                        $this->owner->fieldLabel('ImageItems')
                    )
                ]
            )
        );
        
        // Create Pagination Options (if permitted):
        
        if ($this->owner->canPaginate()) {
            
            $fields->insertBefore(
                SelectionGroup::create(
                    'PaginateItems',
                    [
                        SelectionGroup_Item::create(
                            '0',
                            null,
                            $this->owner->fieldLabel('Disabled')
                        ),
                        SelectionGroup_Item::create(
                            '1',
                            TextField::create(
                                'ItemsPerPage',
                                $this->owner->fieldLabel('ItemsPerPage')
                            ),
                            $this->owner->fieldLabel('Enabled')
                        )
                    ]
                )->setTitle($this->owner->fieldLabel('PaginateItems')),
                'ReverseItems'
            );
            
        }
    }
39514
void  addValToSets(List<RBBINode> sets, int val) {
        for (RBBINode usetNode : sets) {
            addValToSet(usetNode, val);
        }
    }
117775
public void addReadFields(FieldSet readFields) {
		if(this.readFields == null) {
			this.readFields = new FieldSet(readFields);
		} else {
			this.readFields.addAll(readFields);
		}
	}
990703
def add_fields(self, field_dict):
    
    for key, field in field_dict.items():
      self.add_field(key, field)
325965
def set_fields(self, **fields):
        
        for field_name, value in iteritems(fields):
            field = getattr(self, field_name)
            field.proxy_set(value)
477493
public void addReadFields1(FieldSet readFields) {
		if(this.readFields1 == null) {
			this.readFields1 = new FieldSet(readFields);
		} else {
			this.readFields1.addAll(readFields);
		}
	}
1066824
def add_placeholder(self, id_, name, ph_type, orient, sz, idx):
        
        sp = CT_Shape.new_placeholder_sp(
            id_, name, ph_type, orient, sz, idx
        )
        self.insert_element_before(sp, 'p:extLst')
        return sp
326291
def addContinuousSet(self, continuousSet):
        
        id_ = continuousSet.getId()
        self._continuousSetIdMap[id_] = continuousSet
        self._continuousSetIds.append(id_)
        name = continuousSet.getLocalId()
        self._continuousSetNameMap[name] = continuousSet