Build export fields
6726
public function buildExportFields()
    {
        $this->addExportField('id', $this->translator->trans('Id'))
            ->addExportField('date', $this->translator->trans('Date'))
            ->addExportField('language', $this->translator->trans('Language'));
    }
961531
def to_export(export):
        
        from sevenbridges.models.storage_export import Export
        if not export:
            raise SbgError('Export is required!')
        elif isinstance(export, Export):
            return export.id
        elif isinstance(export, six.string_types):
            return export
        else:
            raise SbgError('Invalid export parameter!')
1336957
def export_deleted_fields(self):
        
        result = self.__deleted_fields__.copy()

        for key, value in self.__original_data__.items():
            if key in result:
                continue
            try:
                partial = value.export_deleted_fields()
                result.extend(['.'.join([key, key2]) for key2 in partial])
            except AttributeError:
                pass

        return result
43561
function(path, state) {
  var defaultReexportSpecifier = path.get('specifiers')[0];
  var local = defaultReexportSpecifier.get('local').get('name').node;
  var exported = defaultReexportSpecifier.get('exported').get('name').node;

  if (local !== 'default') {
    throw path.buildCodeFrameError('Only named exports allowed are reexports in index.js');
  }

  // used by Program's exit visitor
  state.set('reexports', true);

  path.replaceWith(
    buildExportsAssignment(
      t.callExpression(
        t.identifier('require'),
        [t.stringLiteral(path.node.source.value)]
      ),
      exported
    )
  );
}
259095
function createForBuild(build) {
  var exports = {};
  
  function bundles(name, sourceType) {
    /*jshint validthis: true */
    var ml = build.bundles(name, sourceType);
    return this.markSafe(ml);
  }
  exports.bundles = bundles;
  
  function link(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.link(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.link = link;
  
  function script(srcPath, relative) {
    /*jshint validthis: true */
    var ml = build.script(srcPath, relative);
    return this.markSafe(ml);
  }
  exports.script = script;
  
  function scriptCode(js) {
    /*jshint validthis: true */
    var ml = '<script type="text/javascript">' + js + '</script>';
    return this.markSafe(ml);
  }
  exports.scriptCode = scriptCode;

  exports.t = build.translate.bind(build);
  exports.tn = build.translateNumeric.bind(build);

  return exports;
}
1252911
public function buildFields()
    {
        $this->addField('domain', 'kuma_translator.adminlist.header.domain', true);
        $this->addField('keyword', 'kuma_translator.adminlist.header.keyword', true);
        $this->addField('status', 'kuma_translator.adminlist.header.status', true);
    }
1151947
function buildNamespaceReexport(metadata, namespace, loose) {
  return (loose
    ? template.statement`
        Object.keys(NAMESPACE).forEach(function(key) {
          if (key === "default" || key === "__esModule") return;
          VERIFY_NAME_LIST;

          EXPORTS[key] = NAMESPACE[key];
        });
      `
    : template.statement`
        Object.keys(NAMESPACE).forEach(function(key) {
          if (key === "default" || key === "__esModule") return;
          VERIFY_NAME_LIST;

          Object.defineProperty(EXPORTS, key, {
            enumerable: true,
            get: function() {
              return NAMESPACE[key];
            },
          });
        });
    `)({
    NAMESPACE: namespace,
    EXPORTS: metadata.exportName,
    VERIFY_NAME_LIST: metadata.exportNameListName
      ? template`
            if (Object.prototype.hasOwnProperty.call(EXPORTS_LIST, key)) return;
          `({ EXPORTS_LIST: metadata.exportNameListName })
      : null,
  });
}
655601
function buildField (args, field, form, model, schema, isArrayField) {
    // create field title from schema or property name
    var title = schema && schema.title
        ? schema.title
        : changeCase.titleCase(field.property)
    // set field title
    field.title = title
    // set label if labels are enabled
    if (form.labels && args.label !== false) {
        field.label = title
        // delete so wont be merged over placeholder
        if (args.label === true) {
            delete args.label
        }
    }
    // set placeholder if placeholders enabled
    if (form.placeholders || args.placeholder !== false) {
        field.placeholder = title
        // delete so wont be merged over placeholder
        if (args.placeholder === true) {
            delete args.placeholder
        }
    }
    // set immutable property on field - field will be disabled/readonly after
    // initial value is set
    if (model.columns[field.property] && model.columns[field.property].immutable) {
        field.immutable = true
    }
    // if property has schema then use schema to populate default values
    if (schema) {
        // if schema is an array then need to create sub fields for elements
        if (schema.type === 'array') {
            // do not allow nested arrays
            assert.ok(!isArrayField, 'nested arrays not supported')
            // build field that is array of fields
            return buildArrayField(args, field, form, model, schema)
        }
        // if schema has enum then default to select type
        else if (schema.enum) {
            field.inputType = 'select'
            field.options = _.map(schema.enum, value => {
                // by default use enum values as both key and value
                var option = {
                    title: value,
                    value: value,
                }
                // set selected flag for default value
                if (schema.default && schema.default === value) {
                    option.selected = true
                }
                return option
            })
        }
        // if value is boolean then default to checkbox
        else if (schema.type === 'boolean') {
            field.inputType = 'checkbox'
            // set default value
            field.value = schema.default
        }
        // otherwise use text
        else {
            field.inputType = 'text'
            // set default value
            field.value = schema.default
        }
        // if schema has pattern apply to field
        if (schema.pattern) {
            field.pattern = schema.pattern
        }
        // use schema description
        field.description = schema.description
        // store schema type on field since multiple schema types may map
        // to the same input type but need to be handled differently
        field.schemaType = schema.type
    }
    // property does not have schema
    else {
        // if property does not have schema then it must have input type
        assert.ok(inputTypes[args.inputType], `field without schema must have inputType ${model.name} ${field.property}`)
    }
    // set id for input
    field.id = model.path+'-'+field.property
    // set name for input as the modelName[property]
    field.name = model.name+'['+field.property+']'
    // merge args over default set for field
    _.merge(field, args)
    // if ckeditor flag is set on field then set for form
    if (field.ckeditor) {
        form.ckeditor = true
    }
    // return built field
    return field
}
1361467
def export(self, name, columns, points):
        """"""

        # Check for completion of loop for all exports
        if name == self.plugins_to_export()[0] and self.buffer != {}:
            # One whole loop has been completed
            # Flush stats to file
            logger.debug("Exporting stats ({}) to JSON file ({})".format(
                listkeys(self.buffer),
                self.json_filename)
            )

            # Export stats to JSON file
            data_json = json.dumps(self.buffer)
            self.json_file.write("{}\n".format(data_json))

            # Reset buffer
            self.buffer = {}

        # Add current stat to the buffer
        self.buffer[name] = dict(zip(columns, points))
1198590
private void exportResources(PluginClassLoaderDef def, ClassloaderBuilder builder, Collection<PluginClassLoaderDef> allPlugins) {
    // export the resources to all other plugins
    builder.setExportMask(def.getBasePluginKey(), def.getExportMask());
    for (PluginClassLoaderDef other : allPlugins) {
      if (!other.getBasePluginKey().equals(def.getBasePluginKey())) {
        builder.addSibling(def.getBasePluginKey(), other.getBasePluginKey(), new Mask());
      }
    }
  }
513865
function exported (options) {
  var exp = arrayify(options.data.root).find(where({ '!kind': 'module', id: this.id }))
  return exp || this
}
1327299
def _export_table(table, fname):
    """"""
    import os.path as op
    extension = op.splitext(fname.lower())[1]
    if extension == '':
        fname = fname + '.csv'
    table.to_csv(fname, index=None, sep=',', encoding='utf-8',
                 float_format='%.4f', decimal='.')
264385
def export(self, fn:PathOrStr, **kwargs):
        ""
        pickle.dump(self.get_state(**kwargs), open(fn, 'wb'))
853443
public function addExportAction()
    {
        $options = array(
            'class'  => 'model-export',
            'target' => null,
            'title'  => $this->_('Export the current data set'),
        );

        return $this->addActionButton($this->_('Export'), $this->get('privilege') . '.export', 'export', $options);
    }
474494
def add_export(exports='/etc/exports', path=None, hosts=None, options=None):
    '''
    
    '''
    if options is None:
        options = []
    if not isinstance(hosts, six.string_types):
        # Lists, etc would silently mangle /etc/exports
        raise TypeError('hosts argument must be a string')
    edict = list_exports(exports)
    if path not in edict:
        edict[path] = []
    new = {'hosts': hosts, 'options': options}
    edict[path].append(new)
    _write_exports(exports, edict)

    return new
369915
def export(self, exclude=[]):
        
        fields = ( (key, self.get_field(key)) for key in self.schema
            if not key.startswith("_") and key not in exclude )
        
        doc = {name: field.export() for name, field in fields}
        return doc
560642
public function export($fields = null, $key_field = null)
    {
        if (!$this->persistence->hasMethod('export')) {
            throw new Exception('Persistence does not support export()');
        }

        // no key field - then just do export
        if ($key_field === null) {
            return $this->persistence->export($this, $fields);
        }

        // do we have added key field in fields list?
        // if so, then will have to remove it afterwards
        $key_field_added = false;

        // prepare array with field names
        if (!is_array($fields)) {
            $fields = [];

            if ($this->only_fields) {

                // Add requested fields first
                foreach ($this->only_fields as $field) {
                    $f_object = $this->getField($field);
                    if ($f_object->never_persist) {
                        continue;
                    }
                    $fields[$field] = true;
                }

                // now add system fields, if they were not added
                foreach ($this->elements as $field => $f_object) {
                    if ($f_object instanceof Field) {
                        if ($f_object->never_persist) {
                            continue;
                        }
                        if ($f_object->system && !isset($fields[$field])) {
                            $fields[$field] = true;
                        }
                    }
                }

                $fields = array_keys($fields);
            } else {

                // Add all model fields
                foreach ($this->elements as $field => $f_object) {
                    if ($f_object instanceof Field) {
                        if ($f_object->never_persist) {
                            continue;
                        }
                        $fields[] = $field;
                    }
                }
            }
        }

        // add key_field to array if it's not there
        if (!in_array($key_field, $fields)) {
            $fields[] = $key_field;
            $key_field_added = true;
        }

        // export
        $data = $this->persistence->export($this, $fields);

        // prepare resulting array
        $return = [];
        foreach ($data as $row) {
            $key = $row[$key_field];
            if ($key_field_added) {
                unset($row[$key_field]);
            }
            $return[$key] = $row;
        }

        return $return;
    }