You are here

hms_field.devel_generate.inc in HMS Field 7

Devel Generate support for HMS Field module.

File

hms_field.devel_generate.inc
View source
<?php

/**
 * @file
 * Devel Generate support for HMS Field module.
 */

/**
 * Implements hook_devel_generate().
 */
function hms_field_devel_generate($object, $field, $instance, $bundle) {
  if (field_behaviors_widget('multiple values', $instance) == FIELD_BEHAVIOR_CUSTOM) {
    return devel_generate_multiple('_hms_field_devel_generate', $object, $field, $instance, $bundle);
  }
  else {
    return _hms_field_devel_generate($object, $field, $instance, $bundle);
  }
}

/**
 * Callback for hook_devel_generate().
 */
function _hms_field_devel_generate($object, $field, $instance, $bundle) {
  return array(
    'value' => mt_rand(-86400, 86400),
  );
}

Functions

Namesort descending Description
hms_field_devel_generate Implements hook_devel_generate().
_hms_field_devel_generate Callback for hook_devel_generate().