Returns an array with attributes passed through options
546925
function(options, view) {
      var attrs = options.attributes;
      if (_.isFunction(attrs)) {
        attrs = attrs(view);
      } else if (_.isString(attrs) && (_.isFunction(defaultAttributeLoaders[attrs]))) {
        attrs = defaultAttributeLoaders[attrs](view);
      }
      if (_.isArray(attrs)) {
        return attrs;
      }
    }
317350
def get_properties(attributes):
        
        return [key for key, value in six.iteritems(attributes)
                if isinstance(value, property)]
1141120
public function getMenuAttributes():array
    {
        if ($this->menu !== null) {
            $attrs = [];
            if ($this->menu->getOrientationClass() == 'dropdown') {
                $attrs['id'] = $this->menu->getLabelledBy();
            }
            $attrs['data-toggle']   = 'dropdown';
            $attrs['aria-haspopup'] = 'true';
            $attrs['aria-expanded'] = 'false';
            return $attrs;
        }
        return [];
    }
615168
private function getWrappedOptions()
    {
        $ret = [];
        foreach (array_keys($this->options) as $option) {
            $ret[] = var_export($option, true);
        }
        return $ret;
    }
1296068
def parse_options options = {}, request = ''
      options.each do |opt, value|
        case opt
        when :timeout, :paging, :mode
          request += "&#{opt}=#{value}"
        when :callback, :stats
          request += "&#{opt}"
        when :fields
          request += "&#{opt}=" + value.join(',') if value.is_a?(Array)
        end
      end
      request
    end
1272133
function productOptionInformation( $objectAttribute, $optionID, $productItem )
    {
        $multioption = $objectAttribute->attribute( 'content' );

        foreach ( $multioption->attribute( 'multioption_list' ) as $multioptionElement )
        {
            foreach ( $multioptionElement['optionlist'] as $option )
            {
                if ( $option['option_id'] != $optionID )
                    continue;

                return array( 'id' => $option['option_id'],
                              'name' => $multioptionElement['name'],
                              'value' => $option['value'],
                              'additional_price' => $option['additional_price'] );
            }
        }
    }
35939
static function attributeHideList()
    {
        $attributes = array();
        $ini = eZINI::instance( 'collect.ini' );
        $attributes[] = $ini->variable( 'InfoSettings', 'TypeAttribute' );
        $attributes[] = $ini->variable( 'EmailSettings', 'SendEmailAttribute' );
        $attributes[] = $ini->variable( 'DisplaySettings', 'DisplayAttribute' );
        $attributes[] = $ini->variable( 'DisplaySettings', 'RedirectURLAttribute' );
        $attributes[] = $ini->variable( 'CollectionSettings', 'CollectAnonymousDataAttribute' );
        $attributes[] = $ini->variable( 'CollectionSettings', 'CollectionUserDataAttribute' );
        return $attributes;
    }
425210
public function toArray()
    {
        // First, call the trait method before filtering
        // with Entity specific methods
        $attributes = $this->attributesToArray($this->attributes);

        foreach ($this->attributes as $key => $attribute) {
            if (in_array($key, $this->hidden)) {
                unset($attributes[$key]);
                continue;
            }
            if ($this->hasGetMutator($key)) {
                $method = 'get'.$this->getMutatorMethod($key);
                $attributes[$key] = $this->$method($attribute);
            }
        }

        return $attributes;
    }
416125
public function toOptionArray()
    {
        $fields[] = [
            'label' => __('---- Default Option ----'),
            'value' => '0',
        ];
        $apiEnabled = $this->helper->isEnabled($this->helper->getWebsite());
        //get datafields options
        if ($apiEnabled) {
            $datafields = $this->getDataFields();

            //set the api error message for the first option
            if (isset($datafields->message)) {
                //message
                $fields[] = [
                    'value' => 0,
                    'label' => $datafields->message,
                ];
            } else {
                //loop for all datafields option
                foreach ($datafields as $datafield) {
                    if (isset($datafield->name)
                        && $datafield->visibility == 'Public'
                    ) {
                        $fields[] = [
                            'value' => $datafield->name,
                            'label' => $datafield->name,
                        ];
                    }
                }
            }
        }

        return $fields;
    }
969467
private function createAttributes()
        {
            $return = [];
            foreach ($this->attributes as $key => $value) {
                if ('data' === $key && is_array($value)) {
                    foreach ($value as $k => $v) {
                        $return[] = 'data-'.$k.'="'.htmlentities(is_array($v)
                                ? implode(' ', $v)
                                : $v, ENT_QUOTES, 'UTF-8', false).'"';
                    }
                } else {
                    $return[] = $key.'="'.htmlentities(is_array($value)
                            ? implode(' ', $value)
                            : $value, ENT_QUOTES, 'UTF-8', false).'"';
                }
            }
            return count($return)
                ? ' '.implode(' ', $return)
                : false;
        }
988289
def get_attrs(self):
        
        if self.action != 'Create':
            return []
        index = self.extra['index']
        ret = [index.hash_key]
        if index.range_key is not None:
            ret.append(index.range_key)
        return ret
322499
function attributes(attrs) {
  attrs = attrs || {};
  var ident = attrs.id || '';
  var classes = attrs.classes || [];
  var keyvals = [];
  Object.keys(attrs).forEach(function (k) {
    if (k !== 'classes' && k !== 'id') keyvals.push([k,attrs[k]]);
  });
  return [ident, classes, keyvals];
}
185507
public function toOptionArray()
    {
        $attributes = $this->attributes
            ->create()
            ->addVisibleFilter();

        $attributeArray = [];
        $attributeArray[] = [
            'label' => __('---- Default Option ----'),
            'value' => '0',
        ];

        foreach ($attributes as $attribute) {
            $attributeCode = $attribute->getAttributeCode();

            if (!in_array($attributeCode, $this->excluded)) {
                $attributeArray[] = [
                    'label' => $attribute->getFrontendLabel(),
                    'value' => $attributeCode,
                ];
            }
        }
        return $attributeArray;
    }
421226
def [](name)
      attribute = @server.getAttribute(@object_name, name.to_s)
      return attribute.value if attribute.kind_of? javax.management.Attribute
      attribute
    end
701165
def get_attributes(input_dict):
        
        return {k.lstrip("@"): v for k, v in input_dict.items() if k[0] == "@"}
804441
function getAttributes(obj) {
    let attrString = '';
    let attrArray = Object.keys(obj);
    for (let tag of attrArray) {
        if (tag != ATTR && ATTRTAG.test(tag)) {
            attrString += ` ${tag.replace('_', '')}="${obj[tag]}"`;
        }
    }
    if (ATTR in obj) {
        attrString += ' ' + obj[ATTR];
    }
    return attrString;
}
1249602
protected function getDataAttrs(): array
    {
        $attrs = array_filter($this->html->getAttributes(), static function ($v, $k) {
            return strpos($k, 'data-') === 0;
        }, ARRAY_FILTER_USE_BOTH);

        $dataAttrs = [];

        foreach ($attrs as $key => $value) {
            $key = substr($key, 5);

            $dataAttrs[$key] = $value;
        }

        return $dataAttrs;
    }