function payment_status_items in Payment 7
Return a render array containing a Payment's status items.
Parameters
Payment $payment:
Return value
array
1 call to payment_status_items()
- PaymentEntityController::view in ./
payment.classes.inc - Implements EntityAPIControllerInterface.
File
- ./
payment.ui.inc, line 585 - The Payment user interface.
Code
function payment_status_items(Payment $payment) {
$status = payment_status_info($payment
->getStatus()->status, TRUE);
$rows = array();
foreach (array_reverse($payment->statuses) as $status_item) {
$status = payment_status_info($status_item->status);
$rows[] = array(
$status->title,
format_date($status_item->created),
);
}
$build['status_items'] = array(
'#type' => 'markup',
'#markup' => theme('table', array(
'header' => array(
t('Status'),
t('Date'),
),
'rows' => $rows,
)),
);
return $build;
}