You are here

function paymentreference_element_info in Payment 7

Implements hook_element_info().

File

modules/paymentreference/paymentreference.module, line 36
Hook implementations and general functions.

Code

function paymentreference_element_info() {
  $elements['paymentreference'] = array(
    '#input' => TRUE,
    '#process' => array(
      'paymentreference_form_process_paymentreference',
    ),
    // The PID of a payment as the default value.
    '#default_value' => 0,
    '#element_validate' => array(
      'paymentreference_form_process_paymentreference_validate',
    ),
    // An array of PaymentLineItem objects.
    '#payment_line_items' => array(),
    '#payment_currency_code' => 'XXX',
    // The path to the page where a payment can be added for this reference.
    '#payment_add_page_path' => '',
    // A callback that returns the PID of a payment that can be used as a
    // reference.
    '#payment_load_callback' => '',
    // Arguments to pass on to the #payment_load_callback callback.
    '#payment_load_arguments' => array(),
    '#value_callback' => 'paymentreference_form_process_paymentreference_value',
  );
  return $elements;
}