const_object_field_list : const_object_field_list const_object_field
969680
def p_const_object_field_list(self, p):
        
        obj = p[1].copy()
        obj.update(p[2])
        p[0] = obj
176752
def fields(self, fields):
        

        if not isinstance(fields, list):
            raise InvalidUsage('fields must be of type `list`')

        self._sysparms['sysparm_fields'] = ",".join(fields)
707308
function flattenFields(fields) {
	const fieldsObj = {};
	fields.forEach(function(field) {
		if (!fields.hasOwnProperty(field.name)) {
			fieldsObj[field.name] = field.value;
		}
	});
	return fieldsObj;
}
326639
def get_fields(self):
        
        l = []
        for i in self.classes.class_def:
            for j in i.get_fields():
                l.append(j)
        return l
45965
def p_const_vector_elem_list_list(p):
    
    if p[1] is None or p[3] is None:
        return

    if not is_static(p[3]):
        if isinstance(p[3], symbols.UNARY):
            tmp = make_constexpr(p.lineno(2), p[3])
        else:
            api.errmsg.syntax_error_not_constant(p.lineno(2))
            p[0] = None
            return
    else:
        tmp = p[3]

    if p[1] is not None:
        p[1].append(tmp)
    p[0] = p[1]
777800
private List<Field> allFields(final Class<?> c) {
        List<Field> l = this.fieldsCache.get(c);
        if (l == null) {
            l = new LinkedList<Field>();
            final Field[] fields = c.getDeclaredFields();
            addAll(l, fields);
            Class<?> sc = c;
            while (((sc = sc.getSuperclass()) != Object.class) && (sc != null)) {
                addAll(l, sc.getDeclaredFields());
            }
            this.fieldsCache.putIfAbsent(c, l);
        }
        return l;
    }
426300
def get_fields(cls):
        
        fields = {}
        for field_name in dir(cls):
            if isinstance(getattr(cls, field_name), Field):
                field = getattr(cls, field_name)
                field_name = field.field_name or field_name
                fields[field_name] = field
        return fields
205257
def p_const_map(self, p):
        ''' '''
        p[0] = ast.ConstMap(dict(p[2]), p.lineno(1))
869232
def _attach_fields(obj):
    
    for attr in base_fields.__all__:
        if not hasattr(obj, attr):
            setattr(obj, attr, getattr(base_fields, attr))
    for attr in fields.__all__:
        setattr(obj, attr, getattr(fields, attr))
764619
def getfield(f):
    """"""
    if isinstance(f, list):
        return [getfield(x) for x in f]
    else:
        return f.value
355100
def namedlist(objname, fieldnames):
    ''
    class NamedListTemplate(list):
        __name__ = objname
        _fields = fieldnames

        def __init__(self, L=None, **kwargs):
            if L is None:
                L = [None]*len(fieldnames)
            super().__init__(L)
            for k, v in kwargs.items():
                setattr(self, k, v)

        @classmethod
        def length(cls):
            return len(cls._fields)

    for i, attrname in enumerate(fieldnames):
        # create property getter/setter for each field
        setattr(NamedListTemplate, attrname, property(operator.itemgetter(i), itemsetter(i)))

    return NamedListTemplate
588571
def p_const_list(self, p):
        ''' '''
        p[0] = ast.ConstList(list(p[2]), p.lineno(1))
311977
function hasAllProperties(fieldList, o) {

   return      (o instanceof Object) 
            &&
               all(function (field) {         
                  return (field in o);         
               }, fieldList);
}
37392
function loadFields(list, callback) {
  list.forEach(loadMethods)

  function loadMethods(field) {
    var module = require('./fields/' + field + '.js')
      , methods

    if (typeof module === 'function' || typeof module === 'string') {
      methods = {}
      methods[field] = module
    }
    else {
      methods = module
    }

    callback(methods)
  }
}
847869
function fields_list() {
    global $mf_domain,$mf_pt_register;

    $post_type =  get_post_type_object($_GET['post_type']);
    $select = array();
    $posttypes = $this->mf_get_post_types();

    print '<div class="wrap">';
    print '<h2>';
    print $post_type->label;
    print '  ';

    print '<span style="font-size:small">';

    $link = sprintf("admin.php?page=mf_dispatcher&noheader=true&mf_section=mf_posttype&mf_action=export_post_type&post_type=%s",$post_type->name);
    $link = wp_nonce_url($link,"export_post_type");
    printf('<a href="%s">%s</a>',$link,__('Export',$mf_domain) );
    print '</span>';

    if(in_array($post_type->name,$mf_pt_register)):
      print '<span style="font-size:small">';
    print ' | ';
      printf('<a href="admin.php?page=mf_dispatcher&mf_section=mf_posttype&mf_action=edit_post_type&post_type=%s">Edit</a> | ',$post_type->name);
      $link = "admin.php?page=mf_dispatcher&init=true&mf_section=mf_posttype&mf_action=delete_post_type&post_type={$post_type->name}";
      $link = wp_nonce_url($link,"delete_post_type_mf_posttype");
      printf('<a class="mf-delete mf_confirm" alt="%s" href="%s">Delete</a>',__("This action can't be undone, are you sure?", $mf_domain ),$link);
      print '</span>';
    endif;

    print '<span class="mf-change-pt" >'.__( 'Choose a Post Type', $mf_domain ).' </span>';
    print '<select id="change-post-type" >';
    foreach($posttypes as $p){
      $selected = '';
      if($p->name == $post_type->name ) $selected = 'selected="selected"';
      printf('<option value="%s" %s >%s</option>',$p->name,$selected,$p->label);
    }
    print '</select>';
    print '</h2>';

    print '<p id="post-search" style="margin-top:16px">';
    print '<a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_group&mf_action=add_group&post_type='.$post_type->name.'" class="add-new-h2 button">+ '.__( 'Create a Group', $mf_domain ).'</a>';
    print '<a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=add_field&post_type='.$post_type->name.'" class="add-new-h2 button mf-btn-add">+ '.__( 'Create a Field', $mf_domain ).'</a>';
    print '</p>';


    //list cusmtom field of post type
    $groups = $this->get_groups_by_post_type($post_type->name);

    if( empty( $groups ) ) :
    ?>
      <div class="message-box info">
        <p>
          This post type haven't any custom field yet,  create one <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=add_field&post_type=<?php print $post_type->name;?>">here</a> or
          you can create a group <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_group&mf_action=add_group&post_type=<?php print $post_type->name;?>">here</a>
        </p>
      </div>
    <?php
    endif;
    foreach( $groups as $group):
    $name = $group['label'];
    if($name != 'Magic Fields'){
      $name = sprintf('<a class="edit-group-h2" href="admin.php?page=mf_dispatcher&mf_section=mf_custom_group&mf_action=edit_group&custom_group_id=%s">%s</a>',$group['id'],$name);

      $add = sprintf('admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=add_field&post_type=%s&custom_group_id=%s',$post_type->name,$group['id']);

      $name .= sprintf('  <span class="mf_add_group_field">(<a href="%s">create field</a>)</span>',$add);

      $delete_link = 'admin.php?page=mf_dispatcher&init=true&mf_section=mf_custom_group&mf_action=delete_custom_group&custom_group_id='.$group['id'];
      $delete_link = wp_nonce_url($delete_link,'delete_custom_group');
      $delete_msg  = __( "This action can't be undone, are you sure?", $mf_domain );

      $name .= sprintf( '  <span class="mf_delete_group_field mf-delete">(<a  alt="%s" class="mf_confirm" href="%s">delete group</a>)</span>', $delete_msg, $delete_link );
    }
    else {
      $name .= sprintf( '  <span class="mf_add_group_field">(<a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=add_field&post_type=%s">create field</a>)</span>',$post_type->name );
    }
    //return all fields for group
    $fields = $this->get_custom_fields_by_group($group['id']);
    ?>
      <h2 class="mf-no-default-group"><?php echo $name; ?></h2><div class="mf-ajax-loading" id="mf-ajax-loading-<?php echo $group['id'];?>"></div>
      <?php if($fields): ?>
     <div>
      <input type="hidden" name="mf_order_fields" id="mf_order_fields" />
     <table class="widefat fixed" id="mf_sortable" cellspacing="0">
      <thead>
        <tr>
          <th scope="col" id="order" class="manage-column column-title" width="5%"></th>
          <th scope="col" id="label" class="manage-column column-title" width="35%"><?php _e('Label',$mf_domain); ?></th>
          <th scope="col" id="name" class="manage-column column-title" width="35%"><?php _e('Name',$mf_domain); ?> (<?php _e('order',$mf_domain); ?>)</th>
          <th scope="col" id="type" class="manage-column column-title" width="25%"><?php _e('Type',$mf_domain); ?></th>
        </tr>
      </thead>
      <tfoot>
         <tr>
          <th scope="col" id="order" class="manage-column column-title" width="5%"></th>
          <th scope="col" id="label" class="manage-column column-title" width="35%"><?php _e('Label',$mf_domain); ?></th>
          <th scope="col" id="name" class="manage-column column-title" width="35%"><?php _e('Name',$mf_domain); ?> (<?php _e('order',$mf_domain); ?>)</th>
          <th scope="col" id="type" class="manage-column column-title" width="25%"><?php _e('Type',$mf_domain); ?></th>
        </tr>
      </tfoot>
      <tbody rel="group-<?php print $group['id']; ?>" >
      <?php foreach($fields as $field): ?>
        <tr id="order_<?php echo $field['id']; ?>">
          <td>
            <img class="mf-order-icon" src="<?php echo MF_BASENAME ?>images/arrows_up_down.gif" />
          </td>
          <td>
            <?php echo $field['label'];?>
            <?php if($field['required_field']): ?><span class="required">*</span> <?php endif; ?>
            <div class="row-actions">
              <span class="edit">
               <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=edit_field&custom_field_id=<?php echo $field['id'];?>"><?php _e('Edit',$mf_domain); ?></a>
              </span> |
              <span class="delete">
                <?php
                $delete_link = "admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=delete_custom_field&custom_field_id={$field['id']}&init=true";
                $delete_link = wp_nonce_url($delete_link,'delete_custom_field');
                $delete_msg = __('This action can\'t be undone, are you sure?', $mf_domain);
                ?>
                <a class="mf_confirm" alt="<?php print $delete_msg; ?>" href="<?php print $delete_link;?>"><?php _e('Delete',$mf_domain)?></a>
              </span>
            </div>
          </td>
          <td><tt><?php echo $field['name'];?></tt> <span style="color: #999;">(<?php echo $field['display_order']; ?>)</span></td>
          <td style="text-transform:capitalize;" ><?php echo preg_replace('/_/',' ',$field['type']);?></td>
        </tr>
       <?php endforeach; ?>
      </tbody>
     </table>
     </div>
     <?php else:?>
      <div class="message-box info">
        <p>
          This group haven't any custom field yet,  create one <a href="admin.php?page=mf_dispatcher&mf_section=mf_custom_fields&mf_action=add_field&post_type=<?php print $post_type->name;?><?php if($group['label'] != "Magic Fields"){?>&custom_group_id=<?php print $group['id'];}?>">here</a>
        </p>
      </div>
     <?php endif; ?>
      <br />
   <?php
      endforeach;
    print '</div>';
  }
1192650
def _fields_list_to_dict(fields):
    
    for key in fields:
        assert isinstance(key, (str,unicode))
    return dict([[key, 1] for key in fields])
227999
def fields(class_or_instance):
    

    # Might it be worth caching this, per class?
    try:
        fields = getattr(class_or_instance, _FIELDS)
    except AttributeError:
        raise TypeError('must be called with a dataclass type or instance')

    # Exclude pseudo-fields.  Note that fields is sorted by insertion
    # order, so the order of the tuple is as the fields were defined.
    return tuple(f for f in fields.values() if f._field_type is _FIELD)