You are here

function pay_transaction::set_title in Pay 7

Same name and namespace in other branches
  1. 6 includes/handlers/pay_transaction.inc \pay_transaction::set_title()

File

includes/handlers/pay_transaction.inc, line 216
A base class for payment transactions.

Class

pay_transaction
@file A base class for payment transactions.

Code

function set_title($value = NULL) {

  // This is likely a dummy transaction.
  if (!$this
    ->pay_form()) {
    return;
  }
  if (!$value) {
    $values = array(
      '@form' => $this
        ->pay_form()
        ->title(),
      '!name' => theme('username', array(
        'account' => $this
          ->user()->name,
      )),
      '!date' => format_date($this->created, 'short'),
    );
    $value = t('Payment for "@form" by !name on !date', $values);
  }
  $this->title = filter_xss($value);
}