uc_payment.info.inc 762 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @file
  4. * Entity Metadata hooks
  5. */
  6. /**
  7. * Implements hook_entity_property_info().
  8. */
  9. function uc_payment_entity_property_info() {
  10. return array(
  11. 'uc_order' => array(
  12. 'properties' => array(
  13. 'payment_balance' => array(
  14. 'type' => 'decimal',
  15. 'label' => t('Balance'),
  16. 'description' => t('The total amount remaining for the order.'),
  17. 'getter callback' => 'uc_payment_balance',
  18. 'query callback' => 'entity_metadata_table_query',
  19. ),
  20. ),
  21. ),
  22. );
  23. }
  24. /**
  25. * Implements hook_entity_property_info_alter().
  26. */
  27. function uc_payment_entity_property_info_alter(&$info) {
  28. $info['uc_order']['properties']['payment_method']['options list'] = 'uc_payment_method_options_list';
  29. }