cck_devel_multiple($function, $object, $field, $instance, $bundle)A simple function to return multiple values for fields that use custom multiple value widgets but don't need any other special multiple values handling. This will call the field generation function a random number of times and compile the results into a node array.
sites/all/modules/devel/devel_generate.fields.inc, line 63
<?php
function cck_devel_multiple($function, $object, $field, $instance, $bundle) {
$object_field = array();
if (function_exists($function)) {
switch ($field['cardinality']) {
case FIELD_CARDINALITY_UNLIMITED:
$max = rand(0, 3); //just an arbitrary number for 'unlimited'
break;
default:
$max = $field['cardinality'] - 1;
break;
}
for ($i = 0; $i <= $max; $i++) {
$object_field[$i] = $function($object, $field, $instance, $bundle);
}
}
return $object_field;
}
?>