root / htmltest / sites / all / modules / addressfield / addressfield.api.php @ a5572547
1 | 85ad3d82 | Assos Assos | <?php
|
---|---|---|---|
2 | |||
3 | /**
|
||
4 | * @file
|
||
5 | * API documentation for Addressfield.
|
||
6 | */
|
||
7 | |||
8 | /**
|
||
9 | * Format generation callback.
|
||
10 | *
|
||
11 | * @param $format
|
||
12 | * The address format being generated.
|
||
13 | * @param $address
|
||
14 | * The address this format is generated for.
|
||
15 | * @param $context
|
||
16 | * An associative array of context information pertaining to how the address
|
||
17 | * format should be generated. If no mode is given, it will initialize to the
|
||
18 | * default value. The remaining context keys should only be present when the
|
||
19 | * address format is being generated for a field:
|
||
20 | * - mode: either 'form' or 'render'; defaults to 'render'.
|
||
21 | * - field: the field info array.
|
||
22 | * - instance: the field instance array.
|
||
23 | * - langcode: the langcode of the language the field is being rendered in.
|
||
24 | * - delta: the delta value of the given address.
|
||
25 | *
|
||
26 | * @ingroup addressfield_format
|
||
27 | */
|
||
28 | function CALLBACK_addressfield_format_callback(&$format, $address, $context = array()) { |
||
29 | // No example.
|
||
30 | } |
||
31 | |||
32 | /**
|
||
33 | * Allows modules to add arbitrary AJAX commands to the array returned from the
|
||
34 | * standard address field widget refresh.
|
||
35 | *
|
||
36 | * @param &$commands
|
||
37 | * The array of AJAX commands used to refresh the address field widget.
|
||
38 | * @param $form
|
||
39 | * The rebuilt form array.
|
||
40 | * @param $form_state
|
||
41 | * The form state array from the form.
|
||
42 | *
|
||
43 | * @see addressfield_standard_widget_refresh()
|
||
44 | */
|
||
45 | function hook_addressfield_standard_widget_refresh_alter(&$commands, $form, $form_state) { |
||
46 | // Display an alert message.
|
||
47 | $commands[] = ajax_command_alert(t('The address field widget has been updated.')); |
||
48 | } |