function _party_hat_devel_generate in Party 7
Same name and namespace in other branches
- 8.2 modules/party_hat/party_hat.devel_generate.inc \_party_hat_devel_generate()
1 call to _party_hat_devel_generate()
- party_hat_devel_generate in modules/
party_hat/ party_hat.devel_generate.inc - @file Party hat developer tools
1 string reference to '_party_hat_devel_generate'
- party_hat_devel_generate in modules/
party_hat/ party_hat.devel_generate.inc - @file Party hat developer tools
File
- modules/
party_hat/ party_hat.devel_generate.inc, line 16 - Party hat developer tools
Code
function _party_hat_devel_generate($object, $field, $instance, $bundle) {
$object_field = array();
// Get All hats
$hats = party_hat_get_all_hats();
$id = array_rand($hats);
$hat = $hats[$id];
$object_field['hat_name'] = $hat->name;
return $object_field;
}