Loading regcode.api.php +6 −3 Original line number Diff line number Diff line Loading @@ -29,10 +29,13 @@ function hook_regcode_validate($edit, $account) { /** * Called when a registration code is loaded * @param array $code An array of reg codes, indexed by the registration * code ID. */ function hook_regcode_load($code) { $code->group = 'foo'; function hook_regcode_load(array $code) { foreach ($code as $rid => $regcode) { $regcode->group = 'foo'; } } Loading regcode.module +6 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,12 @@ function regcode_load_single($id, $conditions = array()) { $regcode->tags[$tag->tid] = $tag->name; } // Allow modules to add properties module_invoke_all('regcode_load', $regcode); /* * Entity loaders expect arrays of objects. entity_load and this function both * invoke the hook below. */ $reg_codes = array($regcode->rid => $regcode); module_invoke_all('regcode_load', $reg_codes); return $regcode; } Loading Loading
regcode.api.php +6 −3 Original line number Diff line number Diff line Loading @@ -29,10 +29,13 @@ function hook_regcode_validate($edit, $account) { /** * Called when a registration code is loaded * @param array $code An array of reg codes, indexed by the registration * code ID. */ function hook_regcode_load($code) { $code->group = 'foo'; function hook_regcode_load(array $code) { foreach ($code as $rid => $regcode) { $regcode->group = 'foo'; } } Loading
regcode.module +6 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,12 @@ function regcode_load_single($id, $conditions = array()) { $regcode->tags[$tag->tid] = $tag->name; } // Allow modules to add properties module_invoke_all('regcode_load', $regcode); /* * Entity loaders expect arrays of objects. entity_load and this function both * invoke the hook below. */ $reg_codes = array($regcode->rid => $regcode); module_invoke_all('regcode_load', $reg_codes); return $regcode; } Loading