function payment_page_method_clone in Payment 7
Clone a payment method and return its payment form.
Parameters
PaymentMethod $payment_method: The payment method to clone.
Return value
array.
1 string reference to 'payment_page_method_clone'
- payment_menu in ./
payment.module - Implements hook_menu().
File
- ./
payment.ui.inc, line 633 - The Payment user interface.
Code
function payment_page_method_clone(PaymentMethod $payment_method) {
$payment_method = clone $payment_method;
$payment_method->pmid = 0;
$payment_method->name = '';
drupal_set_message(t('You are now editing an unsaved clone of payment method %title.', array(
'%title' => $payment_method->title_specific,
)));
return drupal_get_form('payment_form_payment_method', $payment_method);
}