You are here

function hook_ucxf_display_options in Extra Fields Checkout Pane 7

Same name and namespace in other branches
  1. 6.2 uc_extra_fields_pane.api.php \hook_ucxf_display_options()

Add display options for a field or a field value. Useful if you have additional places where you display a value filled in by the customer.

When you have a display option like in the example below, you can ask the instance of UCXF_Field whether the value (or field) may displayed like this: $field->may_display('invoice');

Parameters

UCXF_Field $field: An instance of UCXF_Field, representing a row from the uc_extra_fields table.

Return value

array

1 function implements hook_ucxf_display_options()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

uc_extra_fields_pane_ucxf_display_options in ./uc_extra_fields_pane.module
Implements hook_ucxf_display_options().
1 invocation of hook_ucxf_display_options()
UCXF_Field::edit_form in class/UCXF_Field.class.php
Get the edit form for the field. @access public

File

./uc_extra_fields_pane.api.php, line 58
These hooks are invoked by the Extra Fields Pane module.

Code

function hook_ucxf_display_options($field) {
  $options = array(
    'invoice' => array(
      'title' => t('Invoice'),
      'description' => t('When checked, this value will be shown on my custom created invoice.'),
    ),
  );
  return $options;
}