You are here

function _timefield_devel_generate in Timefield 7

1 call to _timefield_devel_generate()
timefield_devel_generate in ./timefield.devel_generate.inc
1 string reference to '_timefield_devel_generate'
timefield_devel_generate in ./timefield.devel_generate.inc

File

./timefield.devel_generate.inc, line 24

Code

function _timefield_devel_generate($object, $field, $instance, $bundle) {
  $time = rand(0, 86399);
  $time2 = rand($time + 1, 172799);
  $object_field = array();
  $object_field['value'] = $time;
  $object_field['value2'] = $time2;
  $object_field['label'] = devel_create_greeking(rand(2, 3), TRUE);
  $object_field['mon'] = rand(0, 1);
  $object_field['tue'] = rand(0, 1);
  $object_field['wed'] = rand(0, 1);
  $object_field['thu'] = rand(0, 1);
  $object_field['fri'] = rand(0, 1);
  $object_field['sat'] = rand(0, 1);
  $object_field['sun'] = rand(0, 1);
  return $object_field;
}