You are here

function _party_hat_devel_generate in Party 8.2

Same name and namespace in other branches
  1. 7 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;
}