You are here

function asin_devel_generate in Amazon Product Advertisement API 7.2

Same name and namespace in other branches
  1. 7 asin/asin.module \asin_devel_generate()

Implements hook_devel_generate(). Callback for populating ASIN fields with devel_generate module.

Picks a random computer-related book.

File

asin/asin.module, line 479
Defines a field type for referencing an Amazon product.

Code

function asin_devel_generate($object, $field, $instance, $bundle) {
  if (field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_CUSTOM) {
    return devel_generate_multiple('_asin_devel_generate', $object, $field, $instance, $bundle);
  }
  else {
    return _asin_devel_generate($object, $field, $instance, $bundle);
  }
}